C# Class Platformer.Tiles.Spawner

Inheritance: IActivatable, ICameraTrackable
显示文件 Open project: zmthy/play-dead Class Usage Examples

Public Methods

Method Description
ChangeState ( ) : void
Draw ( GameTime gameTime, SpriteBatch spriteBatch ) : void
IsActive ( ) : bool
SetSpawnState ( System.Boolean isActive ) : void

Overrides the state of the spawner so the level can switch old spawns back off.

SetState ( System.Boolean active ) : void

When the spawner is swicthed on it will notify the Level to update it's spawn.

Spawn ( ) : void
Spawner ( Vector2 position, Microsoft.Xna.Framework.Content.ContentManager content ) : System
Update ( GameTime gameTime ) : void
bindToLevel ( Level level ) : void

Binds the spawner to a particular level so it can notify the level if it gets turned on.

getPosition ( ) : Vector2

Private Methods

Method Description
initialise ( Microsoft.Xna.Framework.Content.ContentManager content ) : void

Load the texture assets and position the spawner.

Method Details

ChangeState() public method

public ChangeState ( ) : void
return void

Draw() public method

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

IsActive() public method

public IsActive ( ) : bool
return bool

SetSpawnState() public method

Overrides the state of the spawner so the level can switch old spawns back off.
public SetSpawnState ( System.Boolean isActive ) : void
isActive System.Boolean
return void

SetState() public method

When the spawner is swicthed on it will notify the Level to update it's spawn.
public SetState ( System.Boolean active ) : void
active System.Boolean
return void

Spawn() public method

public Spawn ( ) : void
return void

Spawner() public method

public Spawner ( Vector2 position, Microsoft.Xna.Framework.Content.ContentManager content ) : System
position Vector2
content Microsoft.Xna.Framework.Content.ContentManager
return System

Update() public method

public Update ( GameTime gameTime ) : void
gameTime Microsoft.Xna.Framework.GameTime
return void

bindToLevel() public method

Binds the spawner to a particular level so it can notify the level if it gets turned on.
public bindToLevel ( Level level ) : void
level Level
return void

getPosition() public method

public getPosition ( ) : Vector2
return Vector2