상속: MonoBehaviour
예제 #1
0
    private void Awake()
    {
        playerShootingScript = GetComponent <PlayerShootingScript> ();
        thisRigidbody        = GetComponent <Rigidbody> ();

        floorMask      = LayerMask.GetMask("Floor");
        obscuranceMask = LayerMask.GetMask("Enemy", "Environment");

        switch (currentPlayerBody)
        {
        case PlayerBody.BODY_1:
            playerBodies [0].SetActive(true);
            break;

        case PlayerBody.BODY_2:
            playerBodies [1].SetActive(true);
            break;

        case PlayerBody.BODY_3:
            playerBodies [2].SetActive(true);
            break;

        case PlayerBody.BODY_4:
            playerBodies [3].SetActive(true);
            break;

        case PlayerBody.BODY_5:
            playerBodies [4].SetActive(true);
            break;
        }
    }
예제 #2
0
 private void Start()
 {
     thisRigidbody        = GetComponent <Rigidbody> ();
     thisAnimator         = GetComponentInParent <Animator> ();
     playerMovement       = GetComponent <PlayerMovement> ();
     playerShootingScript = GetComponent <PlayerShootingScript> ();
     playerBoxCollider    = GetComponent <BoxCollider> ();
     gameManager          = GameManager.GetInstance();
 }