Beispiel #1
0
 private void initializeGameStatesCanvas()
 {
     WinConditionText.enabled = false;
     ConditionText.enabled    = false;
     ScoreCanvas.SetActive(false);
     LevelSelectCanvas.SetActive(false);
     BeginCanvas.SetActive(true);
     NeedIntroPanel.gameObject.SetActive(false);
     GameOverCanvas.SetActive(false);
     GameWinCanvas.SetActive(false);
     GamePauseCanvas.SetActive(false);
 }
    void DoNextQuestions()
    {
        CurrentCanvas.SetActive(false);
        this.gameObject.SetActive(false);

        if (!IsMainController)
        {
            GameControllerScript.ActivateCurrentController();
        }
        else
        {
            ScoreCanvas.SetActive(true);
            PlayerPrefs.SetInt("Score", Score);
        }
    }
    void DoNextQuestions()
    {
        CurrentCanvas.SetActive(false);
        this.gameObject.SetActive(false);

        if (!IsMainController)
        {
            GameControllerScript.ActivateCurrentController();
        }
        else
        {
            ScoreCanvas.SetActive(true);
            PlayerPrefs.SetInt("Score", Score);
        }

        StarParent.transform.GetChild(0).GetComponent <Image>().sprite = EmptyStar;
        StarParent.transform.GetChild(1).GetComponent <Image>().sprite = EmptyStar;
        StarParent.transform.GetChild(2).GetComponent <Image>().sprite = EmptyStar;
    }
Beispiel #4
0
    private void NewGame(HardLevel hardlevel)
    {
        GameState      = GameStates.Playing;
        Time.timeScale = 1f;
        initializeScoreCanvas();
        LevelSelectCanvas.SetActive(false);
        ScoreCanvas.SetActive(true);
        NewLineGenerator.Initialize();
        BlocksManager.Instance.ResetGame();
        switch (hardlevel)
        {
        case HardLevel.Easy:
            BlocksManager.Instance.AddLinesOfBlock(3); break;

        case HardLevel.Hard:
            BlocksManager.Instance.AddLinesOfBlock(4); break;

        case HardLevel.Nightmare:
            BlocksManager.Instance.AddLinesOfBlock(5); break;
        }
    }
Beispiel #5
0
 // Start is called before the first frame update
 void Start()
 {
     Time.timeScale = 0;
     Score.score    = 0;
     ScoreCanvas.SetActive(false);
 }
Beispiel #6
0
 public void tapToStart()
 {
     Time.timeScale = 1;
     CanvasStart.SetActive(false);
     ScoreCanvas.SetActive(true);
 }