Esempio n. 1
0
    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;
    }
Esempio n. 2
0
 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();
 }