This commit is contained in:
parent
052971a5f8
commit
22720a0970
|
@ -1,3 +1,4 @@
|
||||||
|
using System;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using DefaultNamespace.ProcessMode;
|
using DefaultNamespace.ProcessMode;
|
||||||
|
@ -7,13 +8,25 @@ using UnityEngine.UI;
|
||||||
|
|
||||||
public class ConsumePowerManager : MonoBehaviour
|
public class ConsumePowerManager : MonoBehaviour
|
||||||
{
|
{
|
||||||
|
|
||||||
|
public static ConsumePowerManager Instance;
|
||||||
|
public delegate void OpenLight();
|
||||||
|
public event OpenLight OnOpenLight;
|
||||||
|
private void Awake()
|
||||||
|
{
|
||||||
|
Instance = this;
|
||||||
|
}
|
||||||
|
|
||||||
public Button confirmBt;
|
public Button confirmBt;
|
||||||
void Start()
|
void Start()
|
||||||
{
|
{
|
||||||
|
|
||||||
confirmBt.onClick.AddListener(delegate
|
confirmBt.onClick.AddListener(delegate
|
||||||
{
|
{
|
||||||
MotionEngine.GetModule<AnimationProcessManager>().HandleClick(GameObject.Find("临时用电"));
|
MotionEngine.GetModule<AnimationProcessManager>().HandleClick(GameObject.Find("临时用电"));
|
||||||
MotionEngine.GetModule<AnimationProcessManager>().HandleClick(GameObject.Find("现场调试"));
|
MotionEngine.GetModule<AnimationProcessManager>().HandleClick(GameObject.Find("现场调试"));
|
||||||
|
|
||||||
|
OnOpenLight();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -25,11 +25,12 @@ namespace DefaultNamespace.ProcessMode
|
||||||
public delegate void UIEventHandler();
|
public delegate void UIEventHandler();
|
||||||
|
|
||||||
public delegate void SendMessagePrompt(string message);
|
public delegate void SendMessagePrompt(string message);
|
||||||
|
|
||||||
// 定义一个事件,使用委托类型
|
// 定义一个事件,使用委托类型
|
||||||
public event CompleteEventHandler OnCompleteEvent;
|
public event CompleteEventHandler OnCompleteEvent;
|
||||||
public event UIEventHandler OnUIEvent;
|
public event UIEventHandler OnUIEvent;
|
||||||
public event SendMessagePrompt OnSendMessagePrompt;
|
public event SendMessagePrompt OnSendMessagePrompt;
|
||||||
|
|
||||||
|
|
||||||
public void AddProcess(string type)
|
public void AddProcess(string type)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue