void Start() { myState = BehaviorState.idle; stateMachine = gameObject.GetComponent<AnimalStateMachine>(); animalMap = GameObject.FindGameObjectWithTag("Map").GetComponent<AnimalMap>(); body = gameObject.GetComponent<FlyingAnimalBody>(); sensory = gameObject.GetComponent<AnimalSensory>(); }
void Awake() { animalMap = this; availableHerds = new Dictionary <AnimalTypes, List <Herd> >(); }
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 }