コード例 #1
0
ファイル: fAddScore.cs プロジェクト: uiters/boom-boom
        void SaveHightScore(HightScore hightScore)
        {
            HightScore[] hightScores = new HightScore[4];
            hightScores[0] = hightScore;
            hightScores[1] = new HightScore()
            {
                Name = game3.Properties.Settings.Default.Name1, Score = game3.Properties.Settings.Default.Score1
            };
            hightScores[2] = new HightScore()
            {
                Name = game3.Properties.Settings.Default.Name2, Score = game3.Properties.Settings.Default.Score2
            };
            hightScores[3] = new HightScore()
            {
                Name = game3.Properties.Settings.Default.Name3, Score = game3.Properties.Settings.Default.Score3
            };
            Array.Sort <HightScore>(hightScores, (x, y) => x.Score.CompareTo(y.Score));
            Array.Reverse(hightScores);

            game3.Properties.Settings.Default.Score1 = hightScores[0].Score;
            game3.Properties.Settings.Default.Name1  = hightScores[0].Name;
            game3.Properties.Settings.Default.Score2 = hightScores[1].Score;
            game3.Properties.Settings.Default.Name2  = hightScores[1].Name;
            game3.Properties.Settings.Default.Score3 = hightScores[2].Score;
            game3.Properties.Settings.Default.Name3  = hightScores[2].Name;
            game3.Properties.Settings.Default.Save();
        }
コード例 #2
0
    public void Cost()
    {
        gameOver.SetActive(true);
        player.SetActive(false);
        Invoke("Invok", 0.5f);

        HightScore.HightCoin();
        HightScore.HightScoreCounter();
    }
コード例 #3
0
 public void BackMenu()
 {
     activeEndPanel.SetActive(true);
     EndGame.coin  = cost;
     EndGame.two   = HudScr.scoreCounter;
     EndGame.three = HightScore.scoreHightCounter;
     Missions.SavedPlayerPrefs();
     HightScore.HightCoin();
     HightScore.HightScoreCounter();
     Exit();
 }
コード例 #4
0
ファイル: GameOver.cs プロジェクト: j0llytr0ll/Outer-Space
    public void Event()
    {
        HightScore.HightCoin();
        HightScore.HightScoreCounter();

        GameObject.FindGameObjectWithTag("VisibleMagnet").GetComponent <MagnetVisible>().StopMagn();

        MagnetVisible.magnetTest = false;
        player.SetActive(false);
        gameOver.SetActive(true);
        Invoke("Invok", 0.5f);
    }