Example #1
0
 public void OnClick_Replay()
 {
     MoneyManger.Instance().ResetGold();
     SceneManager.LoadScene(SceneManager.GetActiveScene().buildIndex);
     SoundManager.Instance().PlayTempBGM();
     Close();
 }
Example #2
0
 public void OnClick_Restart()
 {
     MoneyManger.Instance().ResetGold();
     SceneManager.LoadScene(SceneManager.GetActiveScene().buildIndex);
     UIControl.Instance().CloseAllWindow();
     GameController.Instance().SetInFightScene(true);
     Pause(false);
     Close();
 }
Example #3
0
 public void OnClick_OnEndlessMode()
 {
     UIControl.Instance().LoadScene("EndlessMode");
     GameController.Instance().SetInFightScene(true);
     SoundManager.Instance().PlaySound("buttonClick");
     SoundManager.Instance().PlayBGM("bossFightBGM");
     MoneyManger.Instance().ResetGold();
     UIControl.Instance().OpenSingleWindow(UI_TYPE.Endless);
 }
    public void OnClick_LoadLevel1()
    {
        MoneyManger.Instance().ResetGold();
        UIControl.Instance().LoadScene("SampleScene");
        UIControl.Instance().CloseWindow(UI_TYPE.SelectLevel);
        UIControl.Instance().OpenWindow(UI_TYPE.Training);
        UIWindow trainingSession = UIControl.Instance().GetWindow(UI_TYPE.Training);

        if (trainingSession != null)
        {
            trainingSession.SetWindow("MovingTip");
        }

        GameController.Instance().SetNowScene(1);
    }
 public void OnClick_LoadLevel(int i)
 {
     MoneyManger.Instance().ResetGold();
     UIControl.Instance().LoadScene("Stage" + i.ToString());
     UIControl.Instance().CloseWindow(UI_TYPE.SelectLevel);
     if (0 == i)
     {
         SoundManager.Instance().PlayBGM("trainingStageBGM");
     }
     else if (1 == i)
     {
         SoundManager.Instance().PlayBGM("stage1BGM");
     }
     else if (2 == i)
     {
         SoundManager.Instance().PlayBGM("stage2BGM");
     }
 }
Example #6
0
 private void OnEnable()
 {
     m_Score.text   = "金币:" + MoneyManger.Instance().GetCurrentGold().ToString();
     Time.timeScale = 0;
 }