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.
44 lines
1.5 KiB
44 lines
1.5 KiB
3 years ago
|
using UnityEngine;
|
||
|
using System.Collections;
|
||
|
using AX.MessageSystem;
|
||
|
|
||
|
public class ShowToolbarObject : MonoBehaviour {
|
||
|
|
||
|
private GameObject LoadToolbar;
|
||
|
private GameObject CarToolbar;
|
||
|
private GameObject IntercalateToolbar;
|
||
|
void Start () {
|
||
|
LoadToolbar = transform.Find("ToolbarObject").gameObject;
|
||
|
CarToolbar = transform.Find("DomeView").gameObject;
|
||
|
IntercalateToolbar = transform.Find("IntercalateButton").gameObject;
|
||
|
MessageDispatcher.AddListener("ShowToolbar", ShowToolbar);
|
||
|
MessageDispatcher.AddListener("CloseToolbar", CloseToolbar);
|
||
|
}
|
||
|
private void ShowToolbar(IMessage message)
|
||
|
{
|
||
|
LoadToolbar.SetActive(true);
|
||
|
UIController.instance.GetUITrue();
|
||
|
if (ExamInfoHelpClass.loadSceneMode == ExamInfoHelpClass.LoadSceneMode.PrepareMode ||
|
||
|
ExamInfoHelpClass.loadSceneMode == ExamInfoHelpClass.LoadSceneMode.EditCourceware ||
|
||
|
ExamInfoHelpClass.loadSceneMode == ExamInfoHelpClass.LoadSceneMode.SelfStudyMode||
|
||
|
ExamInfoHelpClass.loadSceneMode == ExamInfoHelpClass.LoadSceneMode.ExamineMode)
|
||
|
{
|
||
|
//IntercalateToolbar.SetActive(true);
|
||
|
}
|
||
|
}
|
||
|
private void CloseToolbar(IMessage message)
|
||
|
{
|
||
|
LoadToolbar.SetActive(false);
|
||
|
CarToolbar.SetActive(false);
|
||
|
IntercalateToolbar.SetActive(false);
|
||
|
}
|
||
|
void OnDestroy()
|
||
|
{
|
||
|
MessageDispatcher.RemoveListener("CloseToolbar", CloseToolbar);
|
||
|
MessageDispatcher.RemoveListener("ShowToolbar", ShowToolbar);
|
||
|
}
|
||
|
void Update () {
|
||
|
|
||
|
}
|
||
|
}
|