// 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>(); }
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>(); } }
// Use this for initialization void Start() { player = GetComponentInParent <P_Movement>(); }
//private float speed = 5f; // Start is called before the first frame update void Awake() { mouseLookScript = GetComponentInChildren <P_MouseLook>(); rb = GetComponent <Rigidbody>(); PlayerInstance = this; }