C# Class Helper.DelayedAction

Class used to allaw delay between successive key event.
Show file Open project: mahmoudbahaa/XNA-Game-project Class Usage Examples

Public Methods

Method Description
DelayedAction ( int keyDelay = 300 ) : System

Constractor of DelayedAction class.

eventHappened ( GameTime gameTime, KeyboardState keyState ) : bool

indicate either the event happened again after the keyDelay has passed. (keyborad version)

eventHappened ( GameTime gameTime, bool condition ) : bool

indicate either the event happened again after the keyDelay has passed. (general version)

Method Details

DelayedAction() public method

Constractor of DelayedAction class.
public DelayedAction ( int keyDelay = 300 ) : System
keyDelay int amount of delay between 2 successive events
return System

eventHappened() public method

indicate either the event happened again after the keyDelay has passed. (keyborad version)
public eventHappened ( GameTime gameTime, KeyboardState keyState ) : bool
gameTime Microsoft.Xna.Framework.GameTime the game time
keyState Microsoft.Xna.Framework.Input.KeyboardState the keyboard state
return bool

eventHappened() public method

indicate either the event happened again after the keyDelay has passed. (general version)
public eventHappened ( GameTime gameTime, bool condition ) : bool
gameTime Microsoft.Xna.Framework.GameTime the game time
condition bool boolean indicating either the condition of the event is true or not.
return bool