Beispiel #1
0
 //*/
 void Game_Reset()
 {
     AppSetting.TotalType        += Typed;
     AppSetting.TotalCollectType += CollectType;
     AppSetting.TotalClear       += Cleared;
     AppSetting.TotalScore       += Score;
     AppSetting.TotalPlaytime    += Playtime.Each;
     Game_IsStarted = false;
     Game_IsReady   = false;
     Game_IsResult  = false;
     MainTick.Stop();
     Playtime.Reset();
     ReadyCounter.Stop();
     ReadyCounter.Interval = 1;
     ReadyCount            = 4;
     Index                = -1;
     Typed                = 0;
     CollectType          = 0;
     Cleared              = 0;
     Score_get            = 0;
     InputKey             = "";
     Disp_Jpn             = "";
     Disp_Kana            = "";
     Score                = 0;
     RemainTime           = InitTimerTime;
     MainLabel.Text       = ProductName;
     CaptionLabel.Text    = "Typing Game ver " + ProductVersion;
     InputLabel.Text      = "";
     RemainTimeLabel.Text = "";
     SpeedLabel.Text      = "Speed";
     ScoreLabel.Text      = "SCORE";
     HighscoreLabel.Text  = "HIGHSCORE: " + AppSetting.HighScore.ToString();
     DataSave();
 }
Beispiel #2
0
 private void MainTick_Tick(object sender, EventArgs e)
 {
     if (Game_IsStarted && (Game_IsReady == false))
     {
         RemainTime--;
         if (RemainTime <= 0)
         {
             MainTick.Stop();
             Playtime.Stop();
             Game_IsStarted = false;
             Game_IsResult  = true;
             MainLabel.Text = AppLang.tx_GameoverText;
             if (Score > AppSetting.HighScore)
             {
                 CaptionLabel.Text    = AppLang.tx_LasthighscoreText + ": " + AppSetting.HighScore.ToString() + " → " + Score.ToString();
                 AppSetting.HighScore = Score;
                 HighscoreLabel.Text  = "HIGHSCORE: " + AppSetting.HighScore.ToString();
             }
             else
             {
                 CaptionLabel.Text = AppLang.tx_LastscoreText + ": " + Score.ToString();
             }
             InputLabel.Text      = "";
             RemainTimeLabel.Text = AppLang.tx_PlaytimeText + ": " + Playtime.Each.ToString("M:ss:fff") + " -> " + ((double)CollectType / Playtime.Each.TotalSeconds).ToString("F3") + " " + AppLang.tx_TypePSecUnit;
         }
         else
         {
             RemainTimeLabel.Text = AppLang.tx_RemaintimeText + ": " + RemainTime.ToString();
         }
     }
 }
Beispiel #3
0
 private void ReadyCounter_Tick(object sender, EventArgs e)
 {
     ReadyCount--;
     ReadyCounter.Interval = 1000;
     if (ReadyCount <= 0)
     {
         ReadyCounter.Stop();
         MainTick.Start();
         Playtime.Start();
         Game_IsReady = false;
         TextPick();
         MainTick.Interval = StdTick;
         MainLabel.Text    = Disp_Jpn;
         CaptionLabel.Text = Disp_Kana;
         InputLabel.Text   = InputKey;
         SpeedLabel.Text   = "Speed: x" + (1.0).ToString("f2");
     }
     else
     {
         MainLabel.Text = "Ready... " + ReadyCount.ToString();
     }
 }
Beispiel #4
0
 public static void Main()
 {
     MainTick t = new MainTick();
 }