Esempio n. 1
0
    public void ClickSignUp()
    {
        if (PasswordInputField.text != PasswordInputField2.text)
        {
            Message.text = "パスワードが一致しません";
            return;
        }

        NCMBManagerScript.signUp(NameInputField.text, PasswordInputField.text);
    }
Esempio n. 2
0
    void ClickOK()
    {
        for (int i = 0; i < PlayerInformation.highScore.Length; i++)
        {
            PlayerInformation.highScore[i] = 0;
        }
        NCMBManagerScript.saveData();

        Message.text = "スコアをリセットしました";
    }
Esempio n. 3
0
    void ClickOK()
    {
        if (NewUserName.text == "")
        {
            Message.text = "入力してください";
            return;
        }
        NCMBManagerScript.changeName(NewUserName.text);

        NewUserName.text = "";
    }
Esempio n. 4
0
    void writeRanking()
    {
        OnlineRanking.text = "<b><size=22>  ONLINE TOP10</size></b>\n";
        NCMBManagerScript.getRanking("expert", OnlineRanking);

        EasyRanking.text = "<b><size=22>  EASY TOP10</size></b>\n";
        NCMBManagerScript.getRanking("easy", EasyRanking);

        NormalRanking.text = "<b><size=22>  NORMAL TOP10</size></b>\n";
        NCMBManagerScript.getRanking("normal", NormalRanking);

        HardRanking.text = "<b><size=22>  HARD TOP10</size></b>\n";
        NCMBManagerScript.getRanking("hard", HardRanking);
    }
Esempio n. 5
0
    public void ClickLogIn()
    {
        NCMBManagerScript.logIn(NameInputField.text, PasswordInputField.text);

        if (saveNamePass.isOn)
        {
            PlayerPrefs.SetString("PlayerName", NameInputField.text);
            PlayerPrefs.SetString("Password", PasswordInputField.text);
            PlayerPrefs.SetInt("saveOn", 1);
        }
        else
        {
            PlayerPrefs.SetString("PlayerName", null);
            PlayerPrefs.SetString("Password", null);
            PlayerPrefs.SetInt("saveOn", 0);
        }
    }
Esempio n. 6
0
    //ハイスコアを保存する
    //levelにはonline,easy,nomal,hard,expertのどれか
    //NewScoreに今のスコアを
    //ハイスコアだったらサーバのデータを更新するようにしてある
    public static bool saveHighScore(string level, int NewScore)
    {
        int levelNum = 0;

        if (level == "online")
        {
            levelNum = 0;
        }
        else if (level == "easy")
        {
            levelNum = 1;
        }
        else if (level == "normal")
        {
            levelNum = 2;
        }
        else if (level == "hard")
        {
            levelNum = 3;
        }
        else if (level == "expert")
        {
            levelNum = 4;
        }

        if (NewScore > highScore[levelNum])
        {
            highScore[levelNum] = NewScore;
            NCMBManagerScript.saveData();
            return(true);
        }
        else
        {
            Debug.Log(NewScore + "はハイスコアではありません。現在の" + level + "のハイスコアは" + highScore[levelNum]);
            return(false);
        }
        return(false);
    }
Esempio n. 7
0
    // Start is called before the first frame update
    void Start()
    {
        Screen.SetResolution(GameManager.width, GameManager.height, Screen.fullScreen);
        QualitySettings.SetQualityLevel(GameManager.quality, true);
        //ログインされていなかったらTitleに戻る
        if (!NCMBManagerScript.getSuccessConnect())
        {
            SceneManager.LoadScene("Title");
            return;
        }

        Debug.Log("OnlineFlag:" + PlayerInformation.OnlineFlag);
        //既にPhotonにつながっている場合接続を切る
        if (PlayerInformation.OnlineFlag)
        {
            PhotonManagerScript.Disconnect();
            PlayerInformation.OnlineFlag = false;
            Debug.Log("OnlineFlag:" + PlayerInformation.OnlineFlag);
        }



        // クリックしたときに呼ばれる関数の設定
        SinglePlayBtn.onClick.AddListener(ClickSinglePlay);
        MultiPlayBtn.onClick.AddListener(ClickMultiPlay);
        RecordBtn.onClick.AddListener(ClickRecord);
        TutorialBtn.onClick.AddListener(ClickTutorial);
        SettingBtn.onClick.AddListener(ClickSetting);
        LogOutBtn.onClick.AddListener(ClickLogOut);
        MoveExitBtn.onClick.AddListener(ClickExit);

        // パネルの非表示
        ConnectingPanel.SetActive(false);
        RecordPanel.SetActive(false);
        SelectGameModePanel.SetActive(false);
    }
Esempio n. 8
0
 void ClickOK()
 {
     NCMBManagerScript.deleteAccount();
 }
Esempio n. 9
0
 void ClickLogOut()
 {
     Debug.Log("clickLogOut");
     NCMBManagerScript.logOut();
     SceneManager.LoadScene("Title");
 }