void Start()
 {
     currentMotionState     = MotionState.Sleeping;
     zombieSensorController = GetComponent <ZombieSensorController>();
     zombieAttackController = GetComponent <ZombieAttackController>();
     animator     = GetComponent <Animator>();
     rigidBody    = GetComponent <Rigidbody>();
     navMeshAgent = GetComponent <NavMeshAgent>();
     audioSource  = GetComponent <AudioSource>();
     bornPosition = transform.position;
     prePosition  = transform.position;
     if (initMotionState != MotionState.Sleeping)
     {
         animator.SetTrigger("Idle");
         currentMotionState = MotionState.Idling;
     }
 }
Пример #2
0
 void Start()
 {
     motionController = GetComponent <ZombieMotionController>();
     sensorController = GetComponent <ZombieSensorController>();
 }