//获取寻路代理 和实例属性 public virtual void Awake() { NavAgent = this.transform.GetComponent <UnityEngine.AI.NavMeshAgent>(); objAttackPoint = transform.Find("hitpoint"); objBuffPoint = transform.Find("buffpoint"); objPoint = transform.Find("point"); //在Update中进行赋值 EntityAttribute = new EntityAttrubte(); }
public virtual void Awake() { NavAgent = this.transform.GetComponent <UnityEngine.AI.NavMeshAgent>(); objAttackPoint = transform.FindChild("hitpoint"); objBuffPoint = transform.FindChild("buffpoint"); objPoint = transform.FindChild("point"); if (objAttackPoint == null || objBuffPoint == null || objPoint == null) { //Debug.LogError("Entity hitpoint or buffpoint or point is null"); } EntityAttribute = new EntityAttrubte(); }