private void PlayeractionButton() { switch (GameController.PheriphericalSelected) { case "Mouse": if (Input.GetMouseButtonDown(0)) { PulseBar.ActivateBar(); AudioPulseSound.Play(); } if (Input.GetMouseButtonDown(1)) { SlowBar.ActivateBar(); } if (Input.GetMouseButtonUp(1)) { SlowBar.ActivateBar(); } break; case "Joystick": if (Input.GetButton("Pulse") || Input.GetButton("Pulse2")) { PulseBar.ActivateBar(); AudioPulseSound.Play(); } if (Input.GetButtonDown("Slowmotion") || Input.GetButtonDown("Slowmotion2")) { PulseBar.ActivateBar(); } if (Input.GetButtonUp("Slowmotion") || Input.GetButtonUp("Slowmotion2")) { PulseBar.ActivateBar(); } break; case "Keyboard": if (Input.GetKeyDown(KeyCode.A)) { PulseBar.ActivateBar(); AudioPulseSound.Play(); } if (Input.GetKey(KeyCode.D)) { PulseBar.ActivateBar(); } if (Input.GetKeyUp(KeyCode.D)) { PulseBar.ActivateBar(); } break; } }
private void GameOver() { //Bars PulseBar.ResetValues(); SlowBar.ResetValues(); //Score PlayerScore = 0; ScoreController.ResetValues(); PlayerIncreaseSpeedTimer = 0f; transform.position = PlayerDeadPosition; //STOP CUBE ANIMATION FloorController.StopAnim(); GameController.cameraPivot = transform.position; GameController.SetCameraParent("Menu"); GameController.ActiveDeadMenu(); ExplotionSound.Play(); }