void Awake() { _player = GetComponent <Player> (); _animator = GetComponent <Animator> (); _jetpack = GetComponentInChildren <Jetpack> (); groundCheck = GetComponentInChildren <BottomCheck> (); }
void Awake() { playerRigidbody = transform.parent.GetComponent <Rigidbody2D> (); player = transform.parent.GetComponent <Player> (); jetpack = transform.parent.GetComponentInChildren <Jetpack> (); groundCheck = transform.parent.GetComponentInChildren <BottomCheck> (); }
void Awake() { groundCheck = GetComponentInChildren <BottomCheck> (); if (!groundCheck) { Debug.LogError("Player requires BottomCheck sript on child, disabling script"); enabled = false; } rigidbody2d = GetComponent <Rigidbody2D> (); jetpack = GetComponentInChildren <Jetpack> (); _animation = GetComponent <PlayerAnimation> (); }
void Awake() { audioPlayer = GetComponent <AudioPlayer> (); jetpack = GetComponent <Jetpack> (); }