示例#1
0
        private void EnsureDefaultHighScores()
        {
            if (Window.LocalStorage[HighScoresKey] != null)
            {
                return;
            }

            HighScore[] scores = new HighScore[10];

            for (int i = 0; i < 10; i++)
            {
                scores[i]       = (HighScore) new object();
                scores[i].Name  = "VTJ";
                scores[i].Score = 10000 - i * 1000;
                scores[i].Level = 1;
            }

            Window.LocalStorage[HighScoresKey] = Json.Stringify(scores);
        }
示例#2
0
        private void EnsureDefaultHighScores()
        {
            if (Window.LocalStorage[HighScoresKey] != null) return;

            HighScore[] scores = new HighScore[10];

            for (int i = 0; i < 10; i++)
            {
                scores[i] = (HighScore)new object();
                scores[i].Name = "VTJ";
                scores[i].Score = 10000 - i * 1000;
                scores[i].Level = 1;
            }

            Window.LocalStorage[HighScoresKey] = Json.Stringify(scores);
        }