Exemplo n.º 1
0
 void Start()
 {
     // 设置ID
     SetID(++EntityManager.lastEntityID);
     //设置状态接口,并指向一个状态
     PeopleAC = gameObject.GetComponent <LocomotionPeople>();
     EntityManager.Instance().RegisterEntity(this);
     States          = this.gameObject.transform.FindChild("PeopleStates").GetComponent <PeopleStates>();
     m_pStateMachine = new StateMachine <People>(this);
     m_pStateMachine.SetCurrentState(States.IdleState);
 }
Exemplo n.º 2
0
 public void happy()
 {
     currentState = PeopleStates.happy;
 }
Exemplo n.º 3
0
 public void normal()
 {
     currentState = PeopleStates.normal;
 }
Exemplo n.º 4
0
 private void Start()
 {
     currentState = PeopleStates.normal;
 }