YanCheng_Metrology/Assets/Scripts/Project/Objects/Other/MobileController.cs

48 lines
1.5 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.EventSystems;
public class MobileController : PermanentTriggerBase
{
public int downIndex = 0;
protected override void OnMDown()
{
switch (downIndex)
{
case 0:
if (GameManager.ProcessMgr.IsRightSubProcessStepsTriggerID(triggerName, false) == 0)
{
GameManager.UIMgr.ShowPanel<UI_ReceiveTaskPanel>(E_UI_Layer.Mid, (panel) =>
{
panel.Init(triggerName);
});
downIndex=1;
}
_highlight.SetHighlighted(false);
break;
case 1:
GameManager.UIMgr.ShowPanel<UI_PlayerSessionPanel>(E_UI_Layer.Mid, (panel) =>
{
panel.Init(triggerName, "我是xxx供电所人员到xxx地方开展经互感器接入式低压电能计量装置安装作业。", PlayerTalk);
});
_highlight.SetHighlighted(false);
downIndex = 2;
break;
}
}
private void PlayerTalk(string triggerID)
{
if (GameManager.ProcessMgr.IsRightSubProcessStepsTriggerID(triggerID, true) == 0)
{
GameManager.UIMgr.ShowPanel<UI_CustomSessionPanel>(E_UI_Layer.Mid, (panel) =>
{
panel.Init(triggerID, "好的", (intTemp) => { GameManager.UIMgr.HidePanel<UI_CustomSessionPanel>(); });
});
}
}
}