C# Class Platformer.Tiles.Spawner

Inheritance: IActivatable, ICameraTrackable
Afficher le fichier Open project: zmthy/play-dead Class Usage Examples

Méthodes publiques

Méthode 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

Méthode Description
initialise ( Microsoft.Xna.Framework.Content.ContentManager content ) : void

Load the texture assets and position the spawner.

Method Details

ChangeState() public méthode

public ChangeState ( ) : void
Résultat void

Draw() public méthode

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

IsActive() public méthode

public IsActive ( ) : bool
Résultat bool

SetSpawnState() public méthode

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

SetState() public méthode

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
Résultat void

Spawn() public méthode

public Spawn ( ) : void
Résultat void

Spawner() public méthode

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

Update() public méthode

public Update ( GameTime gameTime ) : void
gameTime Microsoft.Xna.Framework.GameTime
Résultat void

bindToLevel() public méthode

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
Résultat void

getPosition() public méthode

public getPosition ( ) : Vector2
Résultat Vector2