コード例 #1
0
 void Awake()
 {
     _player     = GetComponent <Player> ();
     _animator   = GetComponent <Animator> ();
     _jetpack    = GetComponentInChildren <Jetpack> ();
     groundCheck = GetComponentInChildren <BottomCheck> ();
 }
コード例 #2
0
 void Awake()
 {
     playerRigidbody = transform.parent.GetComponent <Rigidbody2D> ();
     player          = transform.parent.GetComponent <Player> ();
     jetpack         = transform.parent.GetComponentInChildren <Jetpack> ();
     groundCheck     = transform.parent.GetComponentInChildren <BottomCheck> ();
 }
コード例 #3
0
 void Awake()
 {
     audioPlayer  = GetComponent <AudioPlayer> ();
     _rigidbody2D = GetComponent <Rigidbody2D> ();
     player       = GetComponent <Player> ();
     groundCheck  = GetComponentInChildren <BottomCheck> ();
 }
コード例 #4
0
 void Awake()
 {
     playerController = transform.parent.GetComponent <Player> ();
     playerRigidbody  = transform.parent.GetComponent <Rigidbody2D> ();
     groundCheck      = transform.parent.GetComponentInChildren <BottomCheck> ();
     jetParticle      = GetComponent <ParticleSystem> ();
     currentFuel      = JetFuel;
 }
コード例 #5
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> ();
        }