// Update is called once per frame void Update() { if (playerState == 1) { particleScript.turnParticlesOn(); playerState = 2; } else if (playerState == 2) { transform.position = Vector3.MoveTowards(transform.position, beastModePosition, 0.1f); if (transform.position == beastModePosition) { //InputManagerScript.SetControllerInputActive (false); InputManagerScript.SetGazeInputActive(true); laser.SetActive(false); particleScript.turnParticlesOff(); playerState = 3; soundScript.playBeastBGM(); } } else if (playerState == 3) { energyScript.decrementEnergy(10.0f); } else if (playerState == 4) { transform.position = Vector3.MoveTowards(transform.position, normalModePosition, 0.1f); if (transform.position == normalModePosition) { InputManagerScript.SetGazeInputActive(false); laser.SetActive(true); playerState = 0; soundScript.playNormalBGM(); } } if (numberOfBees == 0) { GetComponent <AudioSource> ().Stop(); AudioSource.PlayClipAtPoint(winningSound, transform.position); } }
// Update is called once per frame void Update() { if (playerState == 1) { particleScript.turnParticlesOn(); playerState = 2; } else if (playerState == 2) { transform.position = Vector3.MoveTowards(transform.position, beastModePosition, 0.1f); if (transform.position == beastModePosition) { //InputManagerScript.SetControllerInputActive (false); InputManagerScript.SetGazeInputActive(true); laser.SetActive(false); particleScript.turnParticlesOff(); playerState = 3; soundScript.playBeastBGM(); } } else if (playerState == 3) { energyScript.decrementEnergy(10.0f); } else if (playerState == 4) { transform.position = Vector3.MoveTowards(transform.position, normalModePosition, 0.1f); if (transform.position == normalModePosition) { InputManagerScript.SetGazeInputActive(false); laser.SetActive(true); playerState = 0; soundScript.playNormalBGM(); } } if (numberOfBees == 0) { SceneManager.LoadScene("TutorialScene"); } }