Example #1
0
 void Awake()
 {
     _player     = GetComponent <Player> ();
     _animator   = GetComponent <Animator> ();
     _jetpack    = GetComponentInChildren <Jetpack> ();
     groundCheck = GetComponentInChildren <BottomCheck> ();
 }
Example #2
0
 void Awake()
 {
     playerRigidbody = transform.parent.GetComponent <Rigidbody2D> ();
     player          = transform.parent.GetComponent <Player> ();
     jetpack         = transform.parent.GetComponentInChildren <Jetpack> ();
     groundCheck     = transform.parent.GetComponentInChildren <BottomCheck> ();
 }
Example #3
0
        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> ();
 }