diff --git a/Role/Role.cs b/Role/Role.cs index ecdfb5a..2d383cd 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();//设置攻击范围 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;