C# Class ScrollingShooter.TwinJet

Inheritance: ScrollingShooter.Enemy
Exibir arquivo Open project: zombiepaladin/scrolling-shooter Class Usage Examples

Public Methods

Method Description
DamageMe ( int amount ) : void

Damages this jet for the amount passed in

Draw ( float elapsedTime, SpriteBatch spriteBatch ) : void

The draw method that gets called each draw cycle

SetFireStage ( TwinJetFireState newState ) : void

Changes the firing stage that this jet is at if necessary

SetPattern ( BossFlightPattern newPattern ) : void

Sets the current flight pattern to the new pattern

StopIntro ( ) : void

Notifies this jet that it's intro is completed

TwinJet ( uint id, Microsoft.Xna.Framework.Content.ContentManager content, Vector2 newPosition ) : Microsoft.Xna.Framework

Creates a shiny new jet

Update ( float elapsedTime ) : void

The update method that gets called each update cycle

Private Methods

Method Description
Explode ( ) : void

Handles exploding for this jet

FireGun ( ) : void

Handles firing the gun for this jet

FireMissiles ( ) : void

Handles firing missiles for this jet

Fly ( ) : void

Handles flying for this jet

checkIfDamaged ( ) : void

Checks if this jet is damaged yet

checkIfGunDestroyed ( ) : void

checks if this jet still has its guns

checkIfGunIsReady ( ) : bool

Check if this jet is ready to fire a bullet

checkIfIntroIsOver ( ) : void

Checks if the intro for this jet is over

checkIfIsAlive ( ) : void

Check if this jet is even alive

checkIfMissilesReady ( ) : bool

Check if this jet is ready to fire a missile

onEntry ( ) : void

Called when the overall state of this jet is changed

onFrame ( float elapsedTime ) : void

Called every update and performs according to the current state

Method Details

DamageMe() public method

Damages this jet for the amount passed in
public DamageMe ( int amount ) : void
amount int The amount of damage to deal
return void

Draw() public method

The draw method that gets called each draw cycle
public Draw ( float elapsedTime, SpriteBatch spriteBatch ) : void
elapsedTime float The time elapsed since the last call
spriteBatch Microsoft.Xna.Framework.Graphics.SpriteBatch The sprite batch to draw things into
return void

SetFireStage() public method

Changes the firing stage that this jet is at if necessary
public SetFireStage ( TwinJetFireState newState ) : void
newState TwinJetFireState The new state to enter
return void

SetPattern() public method

Sets the current flight pattern to the new pattern
public SetPattern ( BossFlightPattern newPattern ) : void
newPattern BossFlightPattern The new pattern to use
return void

StopIntro() public method

Notifies this jet that it's intro is completed
public StopIntro ( ) : void
return void

TwinJet() public method

Creates a shiny new jet
public TwinJet ( uint id, Microsoft.Xna.Framework.Content.ContentManager content, Vector2 newPosition ) : Microsoft.Xna.Framework
id uint the factory id on the underside of this jet
content Microsoft.Xna.Framework.Content.ContentManager The content manager to use
newPosition Microsoft.Xna.Framework.Vector2 The position to spawn the jet
return Microsoft.Xna.Framework

Update() public method

The update method that gets called each update cycle
public Update ( float elapsedTime ) : void
elapsedTime float The time elapsed since the last call
return void