void Start() { AIControl = GetComponent<HMAIControl>(); //获取怪物的ai控制 Anim = GetComponentInChildren<Animator>(); //获取状态机 AttackAction(); }
void Start() { AIControl = GetComponent<HMAIControl>(); //获取怪物的ai控制 PlayerHealth = GameObject.FindGameObjectWithTag("Player").GetComponent<PlayerHealth>(); //获取玩家健康情况 Anim = GetComponentInChildren<Animator>(); //获取状态机 Puppet2D = GetComponentInChildren<Puppet2D_GlobalControl>(); }