Ejemplo n.º 1
0
    // Use this for initialization
    void Start()
    {
        GameStart.AddListener(RestartGame);
        GameEnd.AddListener(StopGame);

        comboText.text       = "Combo : " + comboCount;
        perfectnessText.text = "";
    }
Ejemplo n.º 2
0
    void Start()
    {
        Countdown.onCountdownEnd.AddListener(EnableBoard);
        onGameReset.AddListener(Reset);
        onGameStart.AddListener(StartGame);
        difficultySettingsData = new DifficultySettingsData();
        InitialiseStatPlayerPrefs();
        onGameReset.Invoke();

        customSettingInfo = difficultySettingsData.Difficulties.CustomPlayerPref;
        if (!PlayerPrefs.HasKey(customSettingInfo.Col.Name))
        {
            PlayerPrefs.SetInt(customSettingInfo.Col.Name, customSettingInfo.Col.InitialValue);
        }
        if (!PlayerPrefs.HasKey(customSettingInfo.Row.Name))
        {
            PlayerPrefs.SetInt(customSettingInfo.Row.Name, customSettingInfo.Row.InitialValue);
        }

        Difficulty currentGameDifficulty = GameDifficulty.gameDifficulty.GetCurrentGameDifficulty();

        onGameStart.Invoke(GetDifficultyInfo(currentGameDifficulty));
        DontDestroyOnLoadManager.RemoveObj(GameDifficulty.gameDifficulty.gameObject);
    }
Ejemplo n.º 3
0
 public void OnCreation()
 {
     Debug.Log("MenuViewModel:Start");
     GameStart.AddListener(OnGameStart);
     GameOver.AddListener(OnGameOver);
 }