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; } }
void Start() { motionController = GetComponent <ZombieMotionController>(); sensorController = GetComponent <ZombieSensorController>(); }