Ejemplo n.º 1
0
    //MENU BUTTON CODE
    public void StartGame()
    {
        Cursor.lockState = CursorLockMode.Locked;
        Cursor.visible   = false;

        playerObj.transform.position = PlayerInitialPosition;

        SetCameraParent("Player");

        Countdown.StartAnimation();

        MainMenuPanel.SetActive(false);
        ScorePanel.SetActive(true);
        PulsePanel.SetActive(true);

        for (int i = 0; i < GameObject.FindGameObjectsWithTag("wall").Length; i++)
        {
            Destroy(GameObject.FindGameObjectsWithTag("wall") [i].gameObject);
        }
        for (int i = 0; i < GameObject.FindGameObjectsWithTag("Point").Length; i++)
        {
            Destroy(GameObject.FindGameObjectsWithTag("Point") [i].gameObject);
        }
        SpawnController.SpawnPointSphere();
    }
Ejemplo n.º 2
0
 //GAME STATE CODE
 public void ActiveDeadMenu()
 {
     Cursor.lockState = CursorLockMode.None;
     Cursor.visible   = true;
     MainMenuPanel.SetActive(true);
     PulsePanel.SetActive(false);
     ResetTimerCoundown();
     IsStartGame = false;
 }