Beispiel #1
0
    void OnClick(GameObject go)
    {
        if (go.name == "Button - play")
        {
            SceneManager.LoadScene("Scene_Calendar");
        }
        else if (go.name == "Button - options")
        {
            ShowOptions(true);
        }
        else if (go.name == "Button - back")
        {
            GoBack();
        }
        else if (go.name == "Button - Restore Purchases")
        {
            // restore purchases explicitly
            GameObject.FindGameObjectWithTag("GameManager").GetComponent <GameManager>().RestoreTransactions();
        }
        else if (go.name == "Button - Clear Progress")
        {
            GameObject.Find("NotificationManager").GetComponent <NotificationManager>().DisplayNotification(25, true);
        }
        else if (go.name == "Button Yes")
        {
            SaveGame.DeleteAll();
            GameObject.FindGameObjectWithTag("GameManager").GetComponent <GameManager>().DeleteCloudSave();
            MetricsLogger.Instance.LogCustomEvent("Settings", "ClearGameProgress", "");
        }
        else if (go.name == "Button - Leaderboard")
        {
            if (!GameObject.FindObjectOfType <GameManager>().gameService.GetIsPlayingOffline())
            {
                // show leaderboard UI
                Social.ShowLeaderboardUI();
            }
        }

        else if (go.name == "Button - view credits")
        {
            GameObject.Find("NotificationManager").GetComponent <NotificationManager>().DisplayNotification(17, true);
        }

        else if (go.name == "Button - Language")
        {
            FindObjectOfType <LocalizedTextManager>().ToggleLanguageAndUpdateText();
        }
        else if (go.name == "Button - privacy policy")
        {
            Application.OpenURL("http://hestergames.blogspot.com/2017/03/privacy-policy-social-sessions-game.html");
        }
    }
Beispiel #2
0
    public void AllInitial()
    {
        TitleInitial();
        MajoInitial();
        MaxFps         = 60;
        BGMVol         = 0.6f;
        SEVol          = 0.7f;
        UseScreenInput = 2;
        Load();
        //做啥角色就换成啥
        SelectedGirlInGame[0] = Variable.PlayerFaceType.Sayaka;
        MajoSceneToTitle      = false; //一定要放到魔女初始化后面

        SaveGame.DeleteAll();          //删除存档

        Debug.Log("全部初始化成功");
    }
Beispiel #3
0
 public void newGame()
 {
     SaveGame.DeleteAll();
     SceneManager.LoadScene(SceneManager.GetActiveScene().buildIndex + 1);
 }