forked from zxl/LaboratoryProtection
30 lines
578 B
C#
30 lines
578 B
C#
|
using System;
|
|||
|
using UnityEngine;
|
|||
|
using UnityEngine.UI;
|
|||
|
|
|||
|
namespace UnityTest.ZXL
|
|||
|
{
|
|||
|
public class SummarizeUI : UI
|
|||
|
{
|
|||
|
public Button button;
|
|||
|
private Action action;
|
|||
|
|
|||
|
public override void OnInit()
|
|||
|
{
|
|||
|
base.OnInit();
|
|||
|
button.onClick.AddListener(Over);
|
|||
|
}
|
|||
|
|
|||
|
public void SetAction(Action action)
|
|||
|
{
|
|||
|
this.action = action;
|
|||
|
}
|
|||
|
|
|||
|
private void Over()
|
|||
|
{
|
|||
|
// 结束6-4实验
|
|||
|
Debug.Log("6-4 is finish!! ");
|
|||
|
action?.Invoke();
|
|||
|
}
|
|||
|
}
|
|||
|
}
|