C# Class WarTornLands.Entities.Modules.Think.Parts.JumpAbility

A part for a ThinkModule to give the respective entity a jump ability on TryExecute(). Parameters: Duration (duration of a complete jump) Zenit (max jump height in pixels)
Inheritance: BaseAbility
Show file Open project: floAr/WarTornLands Class Usage Examples

Public Methods

Method Description
JumpAbility ( int duration = 700, float zenit = 3.0f ) : System

Initializes a new instance of the JumpAbility class.

SetOwner ( Entity owner ) : void
TryCancel ( ) : bool
TryExecute ( ) : bool

Tries to execute a jump.

Update ( GameTime gameTime ) : void

Updates the part. May manipulate the Height value of respective owner.

Private Methods

Method Description
OnBang ( object sender, BangEventArgs e ) : void

Method Details

JumpAbility() public method

Initializes a new instance of the JumpAbility class.
public JumpAbility ( int duration = 700, float zenit = 3.0f ) : System
duration int The duration of a jump in ms.
zenit float The zenit of a jump in meter.
return System

SetOwner() public method

public SetOwner ( Entity owner ) : void
owner Entity
return void

TryCancel() public method

public TryCancel ( ) : bool
return bool

TryExecute() public method

Tries to execute a jump.
public TryExecute ( ) : bool
return bool

Update() public method

Updates the part. May manipulate the Height value of respective owner.
public Update ( GameTime gameTime ) : void
gameTime Microsoft.Xna.Framework.GameTime The game time.
return void