C# 클래스 Helper.DelayedAction

Class used to allaw delay between successive key event.
파일 보기 프로젝트 열기: mahmoudbahaa/XNA-Game-project 1 사용 예제들

공개 메소드들

메소드 설명
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)

메소드 상세

DelayedAction() 공개 메소드

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

eventHappened() 공개 메소드

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
리턴 bool

eventHappened() 공개 메소드

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.
리턴 bool