C# Class Helper.DelayedAction

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

Méthodes publiques

Méthode 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 méthode

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

eventHappened() public méthode

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
Résultat bool

eventHappened() public méthode

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.
Résultat bool