Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
        protected override void GameFinished()
        {
            this.State = GameState.Finished;
            GameUpdate newUpdate = new GameUpdate();

            newUpdate.Assign(this.Type, this.Data, this.State);
            base.UpdateSystem(newUpdate);
        }
Exemplo n.º 3
0
        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);
        }
Exemplo n.º 4
0
        ///////////////////////////////////////////////////////////////////////////////////////////
        // 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);
            }
        }
Exemplo n.º 5
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();
     }
 }
Exemplo n.º 6
0
 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;
 }
Exemplo n.º 7
0
 public override void CloseCalled(GameUpdate update, MainWindow game)
 {
     game.button_StartTheGame.IsEnabled = true;
 }
Exemplo n.º 8
0
 abstract public void CloseCalled(GameUpdate update, MainWindow game);
Exemplo n.º 9
0
 abstract public void InitCalled(GameUpdate update, MainWindow game);
Exemplo n.º 10
0
 protected void UpdateSystem(GameUpdate update)
 {
     this.OnUpdate?.Invoke(this, update);
 }
Exemplo n.º 11
0
 public override void CloseCalled(GameUpdate update, MainWindow game)
 {
     Console.WriteLine("[NUT] - CloseCalled");
     game.button_StartTheGame.IsEnabled = true;
 }
Exemplo n.º 12
0
 public override void InitCalled(GameUpdate update, MainWindow game)
 {
     Console.WriteLine("[NUT] - InitCalled");
     game.button_StartTheGame.IsEnabled = false;
 }