C# Class CannonGame.Cannon

Inheritance: GameObject
Show file Open project: obcilion/xnaKanonSpill Class Usage Examples

Public Properties

Property Type Description
Direction Vector2
aiming bool
ball Ball
hasShot bool
placing bool

Public Methods

Method Description
Cannon ( Microsoft.Xna.Framework.Graphics.Texture2D texture, Vector2 position, Vector2 direction ) : System
Control ( ) : void
Draw ( SpriteBatch spriteBatch ) : void
Fire ( Ball ball ) : void
updateRotation ( ) : void

Method Details

Cannon() public method

public Cannon ( Microsoft.Xna.Framework.Graphics.Texture2D texture, Vector2 position, Vector2 direction ) : System
texture Microsoft.Xna.Framework.Graphics.Texture2D
position Vector2
direction Vector2
return System

Control() public method

public Control ( ) : void
return void

Draw() public method

public Draw ( SpriteBatch spriteBatch ) : void
spriteBatch Microsoft.Xna.Framework.Graphics.SpriteBatch
return void

Fire() public method

public Fire ( Ball ball ) : void
ball Ball
return void

updateRotation() public method

public updateRotation ( ) : void
return void

Property Details

Direction public property

public Vector2 Direction
return Vector2

aiming public property

public bool aiming
return bool

ball public property

public Ball,CannonGame ball
return Ball

hasShot public property

public bool hasShot
return bool

placing public property

public bool placing
return bool