Esempio n. 1
0
 // Start is called before the first frame update
 void Start()
 {
     gameMan = FindObjectOfType <GameManager>();
     fadeIn.CrossFadeAlpha(0, 2, false);
     start    = t_Size.transform.position;
     gameOver = false;
     player   = FindObjectOfType <P_Movement>();
 }
Esempio n. 2
0
 private void Awake()
 {
     if (!Player)
     {
         Player = FindObjectOfType <P_Movement>().gameObject;
     }
     if (!pl)
     {
         pl = FindObjectOfType <P_Movement>();
     }
     if (!aimer)
     {
         aimer = GameObject.FindGameObjectWithTag("CameraAimer");
     }
     if (!main)
     {
         main = Camera.main;
     }
     if (!p_RB)
     {
         p_RB = Player.GetComponent <Rigidbody>();
     }
 }
Esempio n. 3
0
 // Use this for initialization
 void Start()
 {
     player = GetComponentInParent <P_Movement>();
 }
Esempio n. 4
0
    //private float speed = 5f;

    // Start is called before the first frame update
    void Awake()
    {
        mouseLookScript = GetComponentInChildren <P_MouseLook>();
        rb             = GetComponent <Rigidbody>();
        PlayerInstance = this;
    }