public override void Update(TargetLala target, Enums.KeybindAction act, int kbWaitInMs = 50) { GameUpdate newUpdate = new GameUpdate(); newUpdate.Assign(this.Type, target, act, this.Data, this.State, kbWaitInMs); base.UpdateSystem(newUpdate); }
protected override void GameFinished() { this.State = GameState.Finished; GameUpdate newUpdate = new GameUpdate(); newUpdate.Assign(this.Type, this.Data, this.State); base.UpdateSystem(newUpdate); }
protected override void GameFinished() { Console.WriteLine("[NUT] - GameFinished"); this.State = GameState.Finished; GameUpdate newUpdate = new GameUpdate(); newUpdate.Assign(this.Type, this.Data, this.State); base.UpdateSystem(newUpdate); }
/////////////////////////////////////////////////////////////////////////////////////////// // System Components /////////////////////////////////////////////////////////////////////////////////////////// private void UpdateSystem(object parent, GameUpdate update) { GameBase gameBase = (parent as GameBase); if (update.State == GameState.Initialized) { gameBase.InitCalled(update, this); } else if (update.State == GameState.Running) { gameBase.RunCalled(update, this); } else if (update.State == GameState.Finished) { gameBase.CloseCalled(update, this); this.RunTimer.Stop(); this.Time = new TimeSpan(0); } }
public override void RunCalled(GameUpdate update, MainWindow game) { if (update.Target == TargetLala.First) { game.LalaOneKeybindWait = update.KeybindWaitInMs; game.cbox_LalaOne_SelectEmote.SelectedValue = update.Action; } else if (update.Target == TargetLala.Second) { game.LalaTwoKeybindWait = update.KeybindWaitInMs; game.cbox_LalaTwo_SelectEmote.SelectedValue = update.Action; } else if (update.Target == TargetLala.Third) { game.LalaThreeKeybindWait = update.KeybindWaitInMs; game.cbox_LalaThree_SelectEmote.SelectedValue = update.Action; } else { throw new NotImplementedException(); } }
public override void InitCalled(GameUpdate update, MainWindow game) { game.label_LalaOne_FinalNumber.Content = (update.Data as GameData).LalaOneFinalNumber; game.label_LalaTwo_FinalNumber.Content = (update.Data as GameData).LalaTwoFinalNumber; game.label_LalaThree_FinalNumber.Content = (update.Data as GameData).LalaThreeFinalNumber; }
public override void CloseCalled(GameUpdate update, MainWindow game) { game.button_StartTheGame.IsEnabled = true; }
abstract public void CloseCalled(GameUpdate update, MainWindow game);
abstract public void InitCalled(GameUpdate update, MainWindow game);
protected void UpdateSystem(GameUpdate update) { this.OnUpdate?.Invoke(this, update); }
public override void CloseCalled(GameUpdate update, MainWindow game) { Console.WriteLine("[NUT] - CloseCalled"); game.button_StartTheGame.IsEnabled = true; }
public override void InitCalled(GameUpdate update, MainWindow game) { Console.WriteLine("[NUT] - InitCalled"); game.button_StartTheGame.IsEnabled = false; }