Ejemplo n.º 1
0
            }   // end of Shared c'tor

            private void ChangeExpression(Boku.Base.GameTimer timer)
            {
                int newFace = BokuGame.bokuGame.rnd.Next(6);

                switch (newFace)
                {
                case 0:
                    boku.DisplayEmotionalState(Face.FaceState.Crazy, (float)(1.0 + BokuGame.bokuGame.rnd.NextDouble()));
                    break;

                case 1:
                    boku.DisplayEmotionalState(Face.FaceState.Happy, (float)(1.0 + BokuGame.bokuGame.rnd.NextDouble()));
                    break;

                case 2:
                    boku.DisplayEmotionalState(Face.FaceState.Mad, (float)(1.0 + BokuGame.bokuGame.rnd.NextDouble()));
                    break;

                case 3:
                    boku.DisplayEmotionalState(Face.FaceState.Remember, (float)(1.0 + BokuGame.bokuGame.rnd.NextDouble()));
                    break;

                case 4:
                    boku.DisplayEmotionalState(Face.FaceState.Sad, (float)(1.0 + BokuGame.bokuGame.rnd.NextDouble()));
                    break;

                case 5:
                    boku.DisplayEmotionalState(Face.FaceState.Squint, (float)(1.0 + BokuGame.bokuGame.rnd.NextDouble()));
                    break;
                }

                timer.Reset(4.0 + 4.0 * BokuGame.bokuGame.rnd.NextDouble());
            }   // end of ChangeExpression()
Ejemplo n.º 2
0
 protected void RepeatPress(Boku.Base.GameTimer timer)
 {
     // NOTE: do not call Start on this timer, it is being used in a caller update model
     timerAutoRepeat.Reset(timeAutoRepeat);
     FireRepeatEvent(digitalPosition);
     if (digitalPosition != DigitalPosition.centered && this.PositionRepeatPress != null)
     {
         this.PositionRepeatPress(this, new StickEventArgs(this.position));
     }
 }
Ejemplo n.º 3
0
 protected void OnRepeatPress(Boku.Base.GameTimer timer)
 {
     // NOTE: do not call Start on this timer, it is being used in a caller update model
     timerAutoRepeat.Reset(timeAutoRepeat);
     if (RepeatPress != null)
     {
         RepeatPress(this, new System.EventArgs());
     }
     this.state = ButtonCommandState.Repeat;
 }
Ejemplo n.º 4
0
 protected void OnRepeatPress(Boku.Base.GameTimer timer)
 {
     // NOTE: do not call Start on this timer, it is being used in a caller update model
     timerAutoRepeat.Reset(timeAutoRepeat);
     if (RepeatPress != null || CharInput != null)
     {
         for (int indexKey = 0; indexKey < this.pressedKeys.Length; indexKey++)
         {
             Keys key = this.pressedKeys[indexKey];
             if (!IsModifierKey(key))
             {
                 if (RepeatPress != null)
                 {
                     RepeatPress(this, new KeyboardKeyEventArgs(key));
                 }
                 if (CharInput != null)
                 {
                     OnChar(key);
                 }
             }
         }
     }
     this.state = KeyCommandState.Repeat;
 }
Ejemplo n.º 5
0
 protected void OnRepeatPress(Boku.Base.GameTimer timer)
 {
     // NOTE: do not call Start on this timer, it is being used in a caller update model
     timerAutoRepeat.Reset(timeAutoRepeat);
     FireRepeatEvent(digitalPosition);
 }