From 62188b271cce5e3aec5ca40d58c30f08643e2f60 Mon Sep 17 00:00:00 2001
From: hch <305670599@qq.com>
Date: 星期四, 04 九月 2025 23:20:17 +0800
Subject: [PATCH] 117 【武将】武将系统 - 天赋部分,优化自动战斗
---
Main/Component/UI/Core/ButtonEx.cs | 16 ++++++++++++++++
1 files changed, 16 insertions(+), 0 deletions(-)
diff --git a/Main/Component/UI/Core/ButtonEx.cs b/Main/Component/UI/Core/ButtonEx.cs
index d70c07c..87d4365 100644
--- a/Main/Component/UI/Core/ButtonEx.cs
+++ b/Main/Component/UI/Core/ButtonEx.cs
@@ -14,8 +14,11 @@
public bool customNegativeSound = false;
public int positiveSound = 0;
public int negativeSound = 0;
+ public float pressedScale = 1.1f;
float m_AbleTime = 0f;
+ private Vector3 originalScale;
+
public float ableTime {
get { return m_AbleTime; }
private set {
@@ -44,6 +47,19 @@
protected override void Awake()
{
base.Awake();
+ originalScale = transform.localScale;
+ }
+
+ public override void OnPointerDown(PointerEventData eventData)
+ {
+ base.OnPointerDown(eventData);
+ transform.localScale = originalScale * pressedScale;
+ }
+
+ public override void OnPointerUp(PointerEventData eventData)
+ {
+ base.OnPointerUp(eventData);
+ transform.localScale = originalScale;
}
private void PlayPositiveSound()
--
Gitblit v1.8.0