void SetSkill(Animator animator) { EnemySkillsAgent skillsAgent = animator.GetComponent <EnemySkillsAgent>(); skillsAgent.currentSkill = skillsAgent.skills.Find(s => s.skillID == SkillID); if (!skillsAgent.currentSkill) { Debug.Log("敌人技能错误:" + SkillID); } }
public override void OnAwake() { enemySkillsAgent = GetComponent <EnemySkillsAgent>(); }