You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
1021 B
34 lines
1021 B
4 years ago
|
using System;
|
||
|
using System.Collections;
|
||
|
using System.Collections.Generic;
|
||
|
using UnityEngine;
|
||
|
|
||
|
public class ChangeInputWay : BaseToggle
|
||
|
{
|
||
|
private GameObject comburentDropdown;
|
||
|
private GameObject comburentInputField;
|
||
|
private void Start()
|
||
|
{
|
||
|
comburentDropdown = transform.parent.Find("Dropdown").gameObject;
|
||
|
comburentInputField = transform.parent.Find("InputField").gameObject;
|
||
|
}
|
||
|
|
||
|
public override void RespondFun(bool value)
|
||
|
{
|
||
|
if (value)
|
||
|
{
|
||
|
comburentDropdown.SetActive(false);
|
||
|
comburentInputField.SetActive(true);
|
||
|
|
||
|
transform.parent.parent.GetComponent<FireSpreadPanel>().chooseObj.GetComponent<FireSpreadCtrl>().combustibleInputWay = true;
|
||
|
}
|
||
|
else
|
||
|
{
|
||
|
comburentDropdown.SetActive(true);
|
||
|
comburentInputField.SetActive(false);
|
||
|
|
||
|
transform.parent.parent.GetComponent<FireSpreadPanel>().chooseObj.GetComponent<FireSpreadCtrl>().combustibleInputWay = false;
|
||
|
}
|
||
|
}
|
||
|
}
|