示例#1
0
文件: Player.cs 项目: sjai013/RPG
    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;
    }
示例#2
0
文件: Monster.cs 项目: sjai013/RPG
 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();
 }