示例#1
0
 void Start()
 {
     myState = BehaviorState.idle;
     stateMachine = gameObject.GetComponent<AnimalStateMachine>();
     animalMap = GameObject.FindGameObjectWithTag("Map").GetComponent<AnimalMap>();
     body = gameObject.GetComponent<FlyingAnimalBody>();
     sensory = gameObject.GetComponent<AnimalSensory>();
 }
示例#2
0
 void Awake()
 {
     animalMap      = this;
     availableHerds = new Dictionary <AnimalTypes, List <Herd> >();
 }
示例#3
0
 void Start()
 {
     myState = BehaviorState.idle;
     stateMachine = gameObject.GetComponent<AnimalStateMachine>();
     animator = gameObject.transform.FindChild("AnimatedChild").gameObject.GetComponent<Animator>();
     body = gameObject.GetComponent<AnimalBody>();
     foodMap = GameObject.FindGameObjectWithTag("Map").GetComponent<FoodMap>();
     animalMap = GameObject.FindGameObjectWithTag("Map").GetComponent<AnimalMap>();
     PrairieBrainStart(); //Only meaningful in the child class PrairieDogBrain
 }