// Use this for initialization void Awake() { MainCamera = GameObject.FindGameObjectWithTag(DoneTags.mainCamera); player = GameObject.FindGameObjectWithTag(DoneTags.player); cameraMovement = MainCamera.GetComponent <DoneCameraMovement>(); playerMovement = player.GetComponent <DonePlayerMovement>(); }
private bool playerDead; // A bool to show if the player is dead or not. void Awake () { // Setting up the references. anim = GetComponent<Animator>(); playerMovement = GetComponent<DonePlayerMovement>(); hash = GameObject.FindGameObjectWithTag(DoneTags.gameController).GetComponent<DoneHashIDs>(); sceneFadeInOut = GameObject.FindGameObjectWithTag(DoneTags.fader).GetComponent<DoneSceneFadeInOut>(); lastPlayerSighting = GameObject.FindGameObjectWithTag(DoneTags.gameController).GetComponent<DoneLastPlayerSighting>(); }
private bool playerDead; // A bool to show if the player is dead or not. void Awake() { // Setting up the references. anim = GetComponent <Animator>(); playerMovement = GetComponent <DonePlayerMovement>(); hash = GameObject.FindGameObjectWithTag(DoneTags.gameController).GetComponent <DoneHashIDs>(); sceneFadeInOut = GameObject.FindGameObjectWithTag(DoneTags.fader).GetComponent <DoneSceneFadeInOut>(); lastPlayerSighting = GameObject.FindGameObjectWithTag(DoneTags.gameController).GetComponent <DoneLastPlayerSighting>(); }