//*/ 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(); }
private void startToolStripMenuItem_Click(object sender, EventArgs e) { if (Game_IsResult) { Game_Reset(); } if (Game_IsStarted == false) { Game_IsStarted = true; Game_IsReady = true; ReadyCounter.Start(); } }
/// <summary> /// Instantiate a Staff Manager /// </summary> public StaffManager() { Counter = new ReadyCounter(); Rankchiefs = new List <RankChief>(); Servers = new List <Server>(); for (int i = 0; i < Global_Settings.nbRankChief; i++) { Rankchiefs.Add(new RankChief()); } for (int i = 0; i < Global_Settings.nbServers; i++) { Servers.Add(new Server()); } Master = new RoomMaster(); StaffManager.Instance.Counter.socket.OrderReadyReception += this.OnOrderReadyToServe; }
/// <summary> /// Instantiate a Staff Manager /// </summary> private StaffManager(List <Table> tables) { Counter = new ReadyCounter(); Rankchiefs = new List <RankChief>(); Servers = new List <Server>(); for (int i = 0; i < Global_Settings.nbRankChief; i++) { Rankchiefs.Add(new RankChief()); } for (int i = 0; i < Global_Settings.nbServers; i++) { Servers.Add(new Server()); } Master = new RoomMaster(tables); SocketCom.instance.OrderReadyReception += this.OnOrderReadyToServe; }
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(); } }