C# Class PathfindingTest.Units.Projectiles.Projectile

Inheritance: PathfindingTest.Combat.DamageSource, Offsetable
ファイルを表示 Open project: Wotuu/RTS_XNA_v2 Class Usage Examples

Private Properties

Property Type Description
CheckCollision void
Draw void
Move void
SetMoveToTarget void

Public Methods

Method Description
Dispose ( ) : void

Disposes of this unit

GetDrawRectangle ( ) : Rectangle
GetLocation ( ) : Point
Hit ( ) : void
Projectile ( Unit parent, Damageable target, DamageEvent type, float movementSpeed, int maxRange, int baseDamage ) : System
Update ( KeyboardState ks, Microsoft.Xna.Framework.Input.MouseState ms ) : void

Updates this projectile.

Protected Methods

Method Description
UpdateMovement ( ) : void

Updates the movement of this projectile.

Private Methods

Method Description
CheckCollision ( ) : void
Draw ( SpriteBatch sb ) : void
Move ( ) : void

Updates the drawing position of this Projectile.

SetMoveToTarget ( int x, int y ) : void

Set the point this Projectile has to move to. direction != direction is used for checking NaNExceptions.

Method Details

Dispose() public method

Disposes of this unit
public Dispose ( ) : void
return void

GetDrawRectangle() public method

public GetDrawRectangle ( ) : Rectangle
return Microsoft.Xna.Framework.Rectangle

GetLocation() public method

public GetLocation ( ) : Point
return Point

Hit() public method

public Hit ( ) : void
return void

Projectile() public method

public Projectile ( Unit parent, Damageable target, DamageEvent type, float movementSpeed, int maxRange, int baseDamage ) : System
parent Unit
target Damageable
type PathfindingTest.Combat.DamageEvent
movementSpeed float
maxRange int
baseDamage int
return System

Update() public method

Updates this projectile.
public Update ( KeyboardState ks, Microsoft.Xna.Framework.Input.MouseState ms ) : void
ks Microsoft.Xna.Framework.Input.KeyboardState
ms Microsoft.Xna.Framework.Input.MouseState
return void

UpdateMovement() protected method

Updates the movement of this projectile.
protected UpdateMovement ( ) : void
return void