public HitCheckTaskAsync(HitCheckTask hitCheckTask, List <MachineButtonItem> buttonItems, MachineButtonItem needButtonItem, int timeOutMs = 4000) : base(null, timeOutMs) { _hitCheckTask = hitCheckTask; _buttonItems = buttonItems; _needButtonItem = needButtonItem; _hitCheckTask.NotifySwitchItem += HitCheckTask_NotifySwitchItem; }
public override void StartGame(DifficultyLevelType diffLevelType, string[] args) { InitGameData(); var buttonItem = ButtonItems[0]; _hitCheckTask = new HitCheckTask(SignKey, buttonItem.ServiceAddress, buttonItem.DeviceNumber, buttonItem.SignName); Task.Factory.StartNew(GameLogic); }