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() { audioPlayer = GetComponent <AudioPlayer> (); _rigidbody2D = GetComponent <Rigidbody2D> (); player = GetComponent <Player> (); groundCheck = GetComponentInChildren <BottomCheck> (); }
void Awake() { playerController = transform.parent.GetComponent <Player> (); playerRigidbody = transform.parent.GetComponent <Rigidbody2D> (); groundCheck = transform.parent.GetComponentInChildren <BottomCheck> (); jetParticle = GetComponent <ParticleSystem> (); currentFuel = JetFuel; }
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> (); }