C# Class PlatformerPOC.Domain.GameWorld

"Physical" game world
Datei anzeigen Open project: bramdemoor/MonoGame-PlatformerPOC Class Usage Examples

Public Properties

Property Type Description
bgLayers List
spawnPointPositions List

Public Methods

Method Description
BuildWorld ( LevelData data ) : void
GameWorld ( PlatformGame game ) : System
IsInBounds ( Vector2 position ) : bool
IsPlaceFreeOfWalls ( Rectangle collisionRectangle ) : bool
PixelsToTiles ( Vector2 worldCoords ) : Vector2
TilesToPixels ( Vector2 tiles ) : Vector2
Update ( GameTime gameTime ) : void

Private Methods

Method Description
IsInBoundsLeft ( Vector2 position ) : bool
IsInBoundsRight ( Vector2 position ) : bool
TilesToPixels ( Rectangle tilesRectangle ) : Rectangle
TilesToPixels ( int tileX, int tileY ) : Vector2
TilesToPixels ( int tiles ) : int

Method Details

BuildWorld() public method

public BuildWorld ( LevelData data ) : void
data PlatformerPOC.Seeding.LevelData
return void

GameWorld() public method

public GameWorld ( PlatformGame game ) : System
game PlatformGame
return System

IsInBounds() public method

public IsInBounds ( Vector2 position ) : bool
position Vector2
return bool

IsPlaceFreeOfWalls() public method

public IsPlaceFreeOfWalls ( Rectangle collisionRectangle ) : bool
collisionRectangle Microsoft.Xna.Framework.Rectangle
return bool

PixelsToTiles() public static method

public static PixelsToTiles ( Vector2 worldCoords ) : Vector2
worldCoords Vector2
return Vector2

TilesToPixels() public static method

public static TilesToPixels ( Vector2 tiles ) : Vector2
tiles Vector2
return Vector2

Update() public method

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

Property Details

bgLayers public_oe property

public List bgLayers
return List

spawnPointPositions public_oe property

public List spawnPointPositions
return List