public void InitializeMe() { sensory = gameObject.GetComponent<AnimalSensory>(); body = gameObject.GetComponent<AnimalBody>(); brain = gameObject.GetComponent<AnimalBrain>(); stateMachine = gameObject.GetComponent<AnimalStateMachine>(); possesor = GameObject.FindGameObjectWithTag("Player").GetComponent<PhantomController>(); moveSpeed = body.moveSpeed; isInitialized = true; if(stateMachine.myType == AnimalType.prairieDog) jumpController = gameObject.GetComponent<JumpController>(); }
void Start() { controller = gameObject.GetComponent<PhantomController>(); tracker = GameObject.FindGameObjectWithTag("MainCamera").GetComponent<LevelMap>(); }
public void Start() { OurPC = GetComponent <PhantomController>(); }