From 3b2a6bb9047cfce9f501593b3669a9c1af6c5df4 Mon Sep 17 00:00:00 2001
From: lcy <1459594991@qq.com>
Date: 星期三, 05 十一月 2025 17:40:23 +0800
Subject: [PATCH] 130 战斗修改回合样式
---
Main/Component/UI/Common/FakeButton2.cs | 19 +++++++------------
1 files changed, 7 insertions(+), 12 deletions(-)
diff --git a/Main/Component/UI/Common/FakeButton2.cs b/Main/Component/UI/Common/FakeButton2.cs
index 30aaa1a..9765204 100644
--- a/Main/Component/UI/Common/FakeButton2.cs
+++ b/Main/Component/UI/Common/FakeButton2.cs
@@ -1,14 +1,13 @@
锘�//--------------------------------------------------------
-// [Author]: 绗簩涓栫晫
+// [Author]: 鐜╀釜娓告垙
// [ Date ]: Saturday, November 25, 2017
//--------------------------------------------------------
using UnityEngine;
using System.Collections;
using UnityEngine.UI;
using UnityEngine.Events;
+using System;
-namespace vnxbqy.UI
-{
[RequireComponent(typeof(RectTransform))]
public class FakeButton2 : MonoBehaviour
{
@@ -17,16 +16,16 @@
public RectTransform rectTransform { get { return m_RectTransform ?? (m_RectTransform = this.transform as RectTransform); } }
float overTime = float.MaxValue;
- UIEvent m_OnClick = new UIEvent();
+ Action m_OnClick;
- public void AddListener(UnityAction _callBack)
+ public void AddListener(Action _callBack)
{
- m_OnClick.AddListener(_callBack);
+ m_OnClick += _callBack;
}
public void RemoveAllListeners()
{
- m_OnClick.RemoveAllListeners();
+ m_OnClick = null;
}
private void LateUpdate()
@@ -47,7 +46,7 @@
{
if (Time.realtimeSinceStartup > overTime)
{
- m_OnClick.Invoke();
+ m_OnClick?.Invoke();
overTime = float.MaxValue;
}
}
@@ -55,8 +54,4 @@
}
}
-
-}
-
-
--
Gitblit v1.8.0