C# Class Platformer.Tiles.WaterDrain

A water drain is a sink that pulls water from an area. Any change of state invoked by the IActivatable interface will always lower the water level.
Inheritance: Tile, IActivatable
Afficher le fichier Open project: zmthy/play-dead

Méthodes publiques

Méthode Description
ChangeState ( ) : void
IsActive ( ) : bool
SetState ( bool active ) : void
Update ( GameTime gameTime ) : void
WaterDrain ( Sprite sprite ) : System

Creates a new water drain.

bindToLevel ( Level level ) : void

Assigns the level the water drain belongs to.

decreaseWaterLevel ( ) : void

Decrease the water level by one (tile).

Private Methods

Méthode Description
drainRow ( int x, int y, bool lookLeft ) : void

Drains a row of tiles, turing all Water tiles into Passable tiles. The process stops when the first non-Water tile is found.

Method Details

ChangeState() public méthode

public ChangeState ( ) : void
Résultat void

IsActive() public méthode

public IsActive ( ) : bool
Résultat bool

SetState() public méthode

public SetState ( bool active ) : void
active bool
Résultat void

Update() public méthode

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

WaterDrain() public méthode

Creates a new water drain.
public WaterDrain ( Sprite sprite ) : System
sprite Sprite The look and position of the water drain.
Résultat System

bindToLevel() public méthode

Assigns the level the water drain belongs to.
public bindToLevel ( Level level ) : void
level Platformer.Levels.Level Housing level.
Résultat void

decreaseWaterLevel() public méthode

Decrease the water level by one (tile).
public decreaseWaterLevel ( ) : void
Résultat void