// Start is called before the first frame update private void OnTriggerEnter(Collider other) { if (other.CompareTag("SnakeMain")) { //Application.LoadLevel(Application.loadedLevel); LoseMenu.Show(); } }
public void Lose() { Cursor.lockState = CursorLockMode.None; Cursor.visible = true; print("Lose"); Time.timeScale = 0; playercamera.GetComponent <PlayerLook>().enabled = false; LoseMenu.SetActive(true); }
private void OnTriggerEnter(Collider other) { if (other.CompareTag("SnakeMain")) { if (indx > 2) { LoseMenu.Show(); } } }
void Death() { if (!inDeathPhase) { inDeathPhase = true; SoundManager.PlayDeathSound(); LoseMenu.Show(); rb.velocity = Vector3.zero; gameObject.SetActive(false); Instantiate(deathParticles, transform.position, Quaternion.identity); } }
private void resetPanelosition() { cameraMenu.GetComponent <RectTransform>().anchoredPosition = Vector2.zero; cameraOptions.GetComponent <RectTransform>().anchoredPosition = Vector2.zero; cameraGame.GetComponent <RectTransform>().anchoredPosition = Vector2.zero; pauseMenu.GetComponent <RectTransform>().anchoredPosition = Vector2.zero; WinMenu.GetComponent <RectTransform>().anchoredPosition = Vector2.zero; LoseMenu.GetComponent <RectTransform>().anchoredPosition = Vector2.zero; pauseMenu.SetActive(false); WinMenu.SetActive(false); LoseMenu.SetActive(false); }
private void Start() { settings = FindObjectOfType <GameSettings>(); loseMenu = FindObjectOfType <LoseMenu>(); winMenu = FindObjectOfType <WinMenu>(); quitMenu = FindObjectOfType <QuitMenu>(); numberOfEnemies = FindObjectsOfType <SmartEnemy>().Length; enemiesLeft = numberOfEnemies; foreach (ParticleSystem ps in FindObjectsOfType(typeof(ParticleSystem))) { ps.Stop(); } CallSettings(); }
protected override void Initialize() { MainMenu = new MainMenu(); MainMenu.Initialise(Content, graphics, this); LoseMenu = new LoseMenu(); LoseMenu.Initialise(Content, this, graphics); WinMenu = new WinMenu(); WinMenu.Initialise(Content, this, graphics); ChampionMenu = new ChampionMenu(); ChampionMenu.Initialise(Content, this, graphics); InPlayMenu = new InPlayMenu(); InPlayMenu.Initialise(Content, this, graphics); GameState = 1; Points = 0; RunThroughTheJungle = Content.Load <Song>("RunThroughTheJungle"); SuzieQ = Content.Load <Song>("SuzieQ"); CurrentSong = RunThroughTheJungle; SongDuration = (float)RunThroughTheJungle.Duration.TotalSeconds; CurrentSongTime = 0f; SongStarted = true; MediaPlayer.Volume = 0.1f; base.Initialize(); }
private void Start() { instance = this; }
private void ShowLosePanel1() { LoseMenu.SetActive(true); Time.timeScale = 0; }