C# 클래스 Platformer.Tiles.WaterSource

A water source is a tap that pushes water into an area. Any change of state invoked by the IActivatable interface will always raise the water level.
상속: Tile, IActivatable
파일 보기 프로젝트 열기: zmthy/play-dead

공개 메소드들

메소드 설명
ChangeState ( ) : void
IsActive ( ) : bool
SetState ( bool active ) : void
Update ( GameTime gameTime ) : void
WaterSource ( Sprite emptySprite, Sprite fullSprite ) : System

Creates a new water source.

bindToLevel ( Level level ) : void

Assigns the level the water source belongs to.

increaseWaterLevel ( ) : void

Increase the water level by one (tile).

비공개 메소드들

메소드 설명
fillRow ( int x, int y, bool lookLeft ) : List

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

propogate ( List waterTiles ) : void

Propogates water tiles by filling adjacent Passable tiles with water. For all provided water tiles, if a Passable tile is found below, to the right, or to the left, that tile will be made Water and will be propogated.

메소드 상세

ChangeState() 공개 메소드

public ChangeState ( ) : void
리턴 void

IsActive() 공개 메소드

public IsActive ( ) : bool
리턴 bool

SetState() 공개 메소드

public SetState ( bool active ) : void
active bool
리턴 void

Update() 공개 메소드

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

WaterSource() 공개 메소드

Creates a new water source.
public WaterSource ( Sprite emptySprite, Sprite fullSprite ) : System
emptySprite Sprite Sprite to indicate a non-water background.
fullSprite Sprite prite to indicate a water background.
리턴 System

bindToLevel() 공개 메소드

Assigns the level the water source belongs to.
public bindToLevel ( Level level ) : void
level Platformer.Levels.Level Housing level.
리턴 void

increaseWaterLevel() 공개 메소드

Increase the water level by one (tile).
public increaseWaterLevel ( ) : void
리턴 void