LaboratoryProtection/Assets/UnityTest/ZXL/Scripts/UI/ComputerScreenUI.cs

30 lines
567 B
C#

using System;
using System.Collections.Generic;
using DG.Tweening;
using DragonSoul.Shared;
using UnityEngine;
using UnityEngine.UI;
namespace UnityTest.ZXL
{
public class ComputerScreenUI : UI
{
public Button btnSure;
private Action action;
private void Start()
{
btnSure.onClick.AddListener(ClickButton);
}
public void SetAction(Action action)
{
this.action = action;
}
private void ClickButton()
{
action?.Invoke();
}
}
}