public DaZhongMahjongRule(MahjongMachine mjMachine, CommonTaskProcesser taskProcesser) { this.mjMachine = mjMachine; this.taskProcesser = taskProcesser; CreateMjCards(); StartThread(); }
void LoadMjResCompleted() { mjMachine = new MahjongMachine(); mjMachine.Start(this); taskProcesser = new CommonTaskProcesser(taskPump); daZhongMjRule = new DaZhongMahjongRule(mjMachine, taskProcesser); }
public void MonitorQuitGame() { if (Input.GetKeyDown(KeyCode.Escape)) { if (Time.time - lastEscKeyPressTime < 0.4f) { isStopedGame = true; mjMachine.Destory(); mjMachine = null; daZhongMjRule.Stop(); Application.Quit(); } else { lastEscKeyPressTime = Time.time; } } }