From 53e24b624e206126bddcc2e0d8399a442d741901 Mon Sep 17 00:00:00 2001 From: wulongxiao <2545507770@qq.com> Date: Sat, 28 Dec 2024 10:27:09 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=8E=89=E8=90=BD=E4=B8=A4?= =?UTF-8?q?=E6=AC=A1=E5=A5=96=E5=8A=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Role/Role.cs | 25 +++++++------------------ 1 file changed, 7 insertions(+), 18 deletions(-) diff --git a/Role/Role.cs b/Role/Role.cs index aa1b37d..e8a1f13 100644 --- a/Role/Role.cs +++ b/Role/Role.cs @@ -1,19 +1,11 @@ using System; -using System.Collections; using System.Collections.Generic; using System.Diagnostics; -using System.Drawing; -using System.Linq; -using System.Reflection; using System.Threading.Tasks; -using UnityEditor; using UnityEngine; using UnityEngine.UI; -using UnityEngine.UIElements; -using Debug = UnityEngine.Debug; -using Image = UnityEngine.UI.Image; using DG.Tweening; -using UnityEngine.SocialPlatforms; + public enum Camp {/// /// 玩家 @@ -117,8 +109,8 @@ public class Role : Fun } } - [Header("掉落")] public float gold = 10f; - public float Gold + [Header("掉落")] public int gold = 6; + public int Gold { [DebuggerStepThrough] get => gold; @@ -219,7 +211,7 @@ public class Role : Fun public void AddBuff(List> buffs, Action buffAction) { buffs.Add(buffAction); - Debug.LogError(this.name + "添加buff到"+ buffs); + UnityEngine.Debug.LogError(this.name + "添加buff到"+ buffs); } /// @@ -229,7 +221,7 @@ public class Role : Fun { foreach (var buff in PlayerBuff) { - Debug.LogError(this.name + "进入执行buff判断"); + UnityEngine.Debug.LogError(this.name + "进入执行buff判断"); buff.Invoke(this); // 将自己作为目标传递 } @@ -324,14 +316,11 @@ public class Role : Fun if (!IsDead) { UIContorl.instance.Killnumber++; - //Destroy(gameObject); - + SkillBox.instance.AddExperience(gold, this.gameObject.transform); IsDead = true; } HaveDieTime++; - Debug.Log("die"); } - } /// @@ -408,7 +397,7 @@ public class Role : Fun Level = 1; // 重置金币 - Gold = 10f; + Gold = 10; // 清空 Buff 列表 buffList.Clear();