45 lines
1.3 KiB
C#
45 lines
1.3 KiB
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
|
|
public class UI_DisassemblyAssemblyNoticePanel : BasePanel
|
|
{
|
|
public string triggerName;
|
|
public void Init(string _triggerName)
|
|
{
|
|
triggerName = _triggerName;
|
|
if (GameManager.RunModelMgr.ModeType == E_ModeType.Study)
|
|
{
|
|
GetControl<Button>("Button_Close").gameObject.SetActive(false);
|
|
}
|
|
}
|
|
public override void ShowMe()
|
|
{
|
|
base.ShowMe();
|
|
GameManager.EventMgr.EventTrigger<bool>(Enum_EventType.PlayerCanMove, false);
|
|
}
|
|
public override void HideMe()
|
|
{
|
|
base.HideMe();
|
|
GameManager.EventMgr.EventTrigger<bool>(Enum_EventType.PlayerCanMove, true);
|
|
}
|
|
protected override void OnClick(string btnName)
|
|
{
|
|
base.OnClick(btnName);
|
|
switch (btnName)
|
|
{
|
|
case "Button_Close":
|
|
GameManager.UIMgr.HidePanel<UI_DisassemblyAssemblyNoticePanel>();
|
|
break;
|
|
case "Button_Define":
|
|
if (GameManager.ProcessMgr.IsRightSubProcessStepsTriggerID(triggerName, true) == 0)
|
|
{
|
|
ScoreManager.instance.Check(triggerName, null);
|
|
GameManager.UIMgr.HidePanel<UI_DisassemblyAssemblyNoticePanel>();
|
|
}
|
|
break;
|
|
}
|
|
}
|
|
}
|