private void Initialisation() { gameManager = FindObjectOfType <scp_GameManager>(); fallingObjects = FindObjectOfType <scp_FallingObjectsLogic>(); vfx = FindObjectOfType <scp_VfxManager>(); ripple = FindObjectOfType <scp_Ripple>(); ui = FindObjectOfType <scp_UIManager>(); audioObject = GameObject.Find("Pickups").GetComponent <scp_AudioManager>(); }
private void Awake() { gameManager = FindObjectOfType <scp_GameManager>(); if (SceneManager.GetActiveScene().name == "scn_GameOver") { GameOverSceneEffects(); gameOverGlitchDelay = Mathf.Clamp(gameOverGlitchDelay, 0, 1); } }
private void Initialisation() { packages = FindObjectOfType <scp_FallingObjectsLogic>(); gameManager = FindObjectOfType <scp_GameManager>(); scoreTextBox = GameObject.Find("txtPro_Score").GetComponent <TextMeshProUGUI>(); scoreTextBox.text = "SCORE:" + gameManager.score.ToString(); livesTextBox = GameObject.Find("txtPro_Lives").GetComponent <TextMeshProUGUI>(); livesTextBox.text = "LIVES: " + gameManager.lives.ToString("f0"); timeTextBox = GameObject.Find("txt_Timer").GetComponent <Text>(); }
private void InitialisationParameters() { posA = spawners[0].transform.position; posB = spawners[1].transform.position; posC = spawners[2].transform.position; posD = spawners[3].transform.position; posE = spawners[4].transform.position; posArray[0] = posA; posArray[1] = posB; posArray[2] = posC; posArray[3] = posD; posArray[4] = posE; gameMan = FindObjectOfType <scp_GameManager>(); countdown = Mathf.Clamp(timer, 0, 10); }
private void FindGameManager() { gameMan = FindObjectOfType <scp_GameManager>(); }