コード例 #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);
        }
コード例 #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);
        }
コード例 #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);
        }
コード例 #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);
            }
        }
コード例 #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();
     }
 }
コード例 #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;
 }
コード例 #7
0
 public override void CloseCalled(GameUpdate update, MainWindow game)
 {
     game.button_StartTheGame.IsEnabled = true;
 }
コード例 #8
0
ファイル: GameBase.cs プロジェクト: trotlinebeercan/lalaslots
 abstract public void CloseCalled(GameUpdate update, MainWindow game);
コード例 #9
0
ファイル: GameBase.cs プロジェクト: trotlinebeercan/lalaslots
 abstract public void InitCalled(GameUpdate update, MainWindow game);
コード例 #10
0
ファイル: GameBase.cs プロジェクト: trotlinebeercan/lalaslots
 protected void UpdateSystem(GameUpdate update)
 {
     this.OnUpdate?.Invoke(this, update);
 }
コード例 #11
0
 public override void CloseCalled(GameUpdate update, MainWindow game)
 {
     Console.WriteLine("[NUT] - CloseCalled");
     game.button_StartTheGame.IsEnabled = true;
 }
コード例 #12
0
 public override void InitCalled(GameUpdate update, MainWindow game)
 {
     Console.WriteLine("[NUT] - InitCalled");
     game.button_StartTheGame.IsEnabled = false;
 }