Exemplo n.º 1
0
 // Use this for initialization
 void Start()
 {
     PeopleAC = this.gameObject.GetComponent <LocomotionPeople>();
     follower = GameObject.FindGameObjectWithTag(Tags.Follower).GetComponent <Follower>();
     // follower.CleanWaittime();
     timeclock = 0;
 }
Exemplo n.º 2
0
 //这个的前提是要所有类型的people都有类似的mecanim
 void Start()
 {
     // animator = this.gameObject.GetComponent<Animator>();
     //locomotion = new Locomotion(animator);
     audiosource = this.gameObject.GetComponent <AudioSource>();
     PeopleAC    = this.gameObject.GetComponent <LocomotionPeople>();
     clock       = 0;
 }
Exemplo n.º 3
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.º 4
0
 void Start()
 {
     audiosource = this.gameObject.GetComponent <AudioSource>();
     leader      = GameObject.FindGameObjectWithTag(Tags.Leader).GetComponent <Leader>();
     PeopleAC    = this.gameObject.GetComponent <LocomotionPeople>();
 }