void Awake() { rb = GetComponent <Rigidbody2D>(); toes = GetComponentInChildren <Toes>(); animator = transform.GetChild(0).GetComponent <Animator>(); playerBase = GetComponentInChildren <PlayerBaseSounds>(); }
protected void SetupDependencies() { rb = GetComponent <Rigidbody2D>(); animator = GetComponentInChildren <Animator>(); sounds = GetComponentInChildren <PlayerBaseSounds>(); Assert.IsNotNull(animator, "ERROR: Couldn't find component of type 'Animator' in object \"" + gameObject.name + "\" or any of its children"); toes = GetComponentInChildren <Toes>(); Assert.IsNotNull(toes, "ERROR: Couldn't find component of type 'toes' in object \"" + gameObject.name + "\" or any of its children"); }
private void Start() { //animator = transform.GetChild(0).GetComponent<Animator>(); baseSounds = GetComponentInChildren <PlayerBaseSounds>(); }
private void Start() { rageDollPool = GameObject.Find(("RageDollPool")).transform; sounds = GetComponentInChildren <PlayerBaseSounds>(); playerRage = GameObject.Find("Player").GetComponent <Rage>(); }