天津中沙油库五期
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.
 
 
 
 

94 lines
3.1 KiB

using AX.MessageSystem;
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class ReplayUIManager : MonoBehaviour
{
//private GameObject rolePanel;
// private GameObject roleSelectPanel;
private GameObject bottomCenterUI;
// private GameObject editorRight;
private void Start()
{
//rolePanel = transform.Find("RolePanel").gameObject;
//roleSelectPanel = transform.Find("RoleSelectPanel").gameObject;
bottomCenterUI = transform.Find("BottomCenterUI").gameObject;
//editorRight = transform.Find("TopUI/EditorRight").gameObject;
SetUI();
}
// Use this for initialization
void Awake()
{
MessageDispatcher.AddListener("PlayStatusChanged", PlayStatusChanged);
}
private void SetUI()
{
if (DisasterManager.model == PlayModel.view)
{
//rolePanel.SetActive(false);//单机版注释
//roleSelectPanel.SetActive(false);//单机版注释
//editorRight.SetActive(false);//单机版注释
}
else if (DisasterManager.model == PlayModel.editor)
{
//rolePanel.SetActive(true);//单机版注释
//roleSelectPanel.SetActive(true);//单机版注释
//editorRight.SetActive(true);//单机版注释
MultiSelectNAV.GetInstance.gameObject.SetActive(true);
}
/*
if (DisasterManager.editorRight)
{
bottomCenterUI.SetActive(true);
}
else
{
bottomCenterUI.SetActive(false);
}
*/
FireManSkillsPanel.GetInstance.gameObject.SetActive(false);
TruckSkillSPanel.GetInstance.gameObject.SetActive(false);
}
private void PlayStatusChanged(IMessage obj)
{
//if (DisasterManager.editorRight)
//{
var playStatus = ReplaySetting.PlayStatus;
switch (playStatus)
{
case PlayStatus.normal:
MultiSelectNAV.GetInstance.gameObject.SetActive(true);
bottomCenterUI.SetActive(true);
break;
case PlayStatus.isReplay:
MultiSelectNAV.GetInstance.gameObject.SetActive(false);
bottomCenterUI.SetActive(false);
break;
case PlayStatus.isEditor:
MultiSelectNAV.GetInstance.gameObject.SetActive(true);
bottomCenterUI.SetActive(true);
break;
default:
break;
}
PowerAttributePanel.GetInstance.gameObject.SetActive(false);
FireManSkillsPanel.GetInstance.gameObject.SetActive(false);
TruckSkillSPanel.GetInstance.gameObject.SetActive(false);
TeamNameSetting.GetInstance.gameObject.SetActive(false);
CarAttributePanle.GetInstance.gameObject.SetActive(false);
WaterFlowAttribute.GetInstance.gameObject.SetActive(false);
//}
//else
//{
// bottomCenterUI.SetActive(false);
//}
}
private void OnDestroy()
{
MessageDispatcher.RemoveListener("PlayStatusChanged", PlayStatusChanged);
}
}