void Awake() { agent = GetComponent<NavMeshAgent>(); anim = GetComponent<Animator>(); setAnim(); state = new BattleState(); state.setState(BattleState.State.Idle); origPos = this.gameObject.transform.position; origRot = this.gameObject.transform.rotation; }
void Awake() { anim = this.GetComponent<Animator>(); agent = this.GetComponent<NavMeshAgent>(); hpBar = this.GetComponentInChildren<HPBar>(); monsterAI = this.GetComponent<MonsterAI>(); atbBar = this.GetComponentInChildren<ATBBar>(); state = new BattleState(); state.setState(BattleState.State.Idle); setAnim(); }