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.
|
|
|
using AX.MessageSystem;
|
|
|
|
using System.Collections;
|
|
|
|
using System.Collections.Generic;
|
|
|
|
using UnityEngine;
|
|
|
|
using System;
|
|
|
|
using UnityEngine.UI;
|
|
|
|
|
|
|
|
public class DisasterTitle : MonoBehaviour {
|
|
|
|
|
|
|
|
public GameObject DisaterContent;
|
|
|
|
|
|
|
|
private void Awake()
|
|
|
|
{
|
|
|
|
MessageDispatcher.AddListener("LOAD_UIDISASTER", LoadUIDisaster);
|
|
|
|
}
|
|
|
|
|
|
|
|
private void OnDestroy()
|
|
|
|
{
|
|
|
|
MessageDispatcher.RemoveListener("LOAD_UIDISASTER", LoadUIDisaster);
|
|
|
|
}
|
|
|
|
|
|
|
|
private void LoadUIDisaster(IMessage obj)
|
|
|
|
{
|
|
|
|
if (GameSettings.othersSettings.isSelectedDisaster)
|
|
|
|
{
|
|
|
|
if (GameSettings.othersSettings.mode != Mode.DisasterManagement)
|
|
|
|
{//若是练习或演习模式进入导调组界面,则不可以修改
|
|
|
|
//foreach (Transform item in DisaterContent.transform)
|
|
|
|
//{
|
|
|
|
// item.GetComponent<Toggle>().interactable = false;
|
|
|
|
//}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
if (!GameSettings.disasterSetting.isEdit)
|
|
|
|
{//若是灾情库设置模式的查看,则不可以修改
|
|
|
|
foreach (Transform item in DisaterContent.transform)
|
|
|
|
{
|
|
|
|
item.GetComponent<Toggle>().interactable = false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
//若是灾情库设置模式的编辑,则可以修改
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// Use this for initialization
|
|
|
|
void Start ()
|
|
|
|
{
|
|
|
|
if (GameSettings.othersSettings.SceneType == SceneType.化工建筑)
|
|
|
|
{
|
|
|
|
DisaterContent.transform.Find("FireLiquidLevel").gameObject.SetActive(true);
|
|
|
|
DisaterContent.transform.Find("FlowLeak").gameObject.SetActive(true);
|
|
|
|
DisaterContent.transform.Find("SplashLeak").gameObject.SetActive(true);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
DisaterContent.transform.Find("FireLiquidLevel").gameObject.SetActive(false);
|
|
|
|
DisaterContent.transform.Find("FlowLeak").gameObject.SetActive(false);
|
|
|
|
DisaterContent.transform.Find("SplashLeak").gameObject.SetActive(false);
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
// Update is called once per frame
|
|
|
|
void Update () {
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|