} // 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()
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)); } }
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; }
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; }
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); }