From bc7c681282bfcc23bb7b79acc44a480401debd45 Mon Sep 17 00:00:00 2001 From: wulongxiao <2545507770@qq.com> Date: Wed, 8 Jan 2025 19:08:25 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- base/base.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/base/base.cs b/base/base.cs index 38e1b18..e8ad34d 100644 --- a/base/base.cs +++ b/base/base.cs @@ -12,7 +12,7 @@ public class Base : MonoBehaviour { [HideInInspector] public string description = ""; - private List LoadClassName = new List() { "gameGlobal", "Mengyao_Skill_Date" };//写入需要全局自动实例化的类 + private List LoadClassName = new List() { "gameGlobal" };//写入需要全局自动实例化的类 // [Header("关闭窗口的按钮")] public Button retbutton; // [Header("需要关闭的窗口")] public GameObject ClosureObj; public static GameObject GlobalObj; From 7a9220f737de87a7bdc1c65ae10579ece557e4a4 Mon Sep 17 00:00:00 2001 From: liuliang <597380732@qq.com> Date: Wed, 8 Jan 2025 21:03:19 +0800 Subject: [PATCH 2/2] add --- Role/Role.cs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/Role/Role.cs b/Role/Role.cs index af64817..35d98dd 100644 --- a/Role/Role.cs +++ b/Role/Role.cs @@ -218,7 +218,16 @@ public class Role : Fun public virtual async void Start() { - + if (mySkillUp == null) + { + mySkillUp = this.transform.GetComponent(); + } + + if (mySkillUp == null) + { + UnityEngine.Debug.LogError(this.name+"mySkillUp is no"); + } + maxHp = hp; SetSelfInfo(); //SetAttackRange();//设置攻击范围