C# Class MiningGame.Code.GameWorld

Inheritance: UpdatableAndDrawable
Show file Open project: geel9/Minor-Destruction

Public Properties

Property Type Description
DroppedItems List
GameMode MiningGame.Code.GameModes.ClientGameMode
GameProjectiles List
OtherPlayers List
Random System.Random
ThePlayer PlayerController
WorldBlocks ].BlockData[

Public Methods

Method Description
AbsoluteToTile ( Vector2 tile ) : Vector2
Draw ( SpriteBatch sb ) : void
DroppedItemOfID ( short ID ) : EntityDroppedItem
GameWorld ( ) : System
GetBlockAt ( float x, float y ) : BlockData
GetBlockAt ( int x, int y ) : BlockData
GetPlayer ( byte id ) : PlayerEntity
HandleGameEvent ( byte eventID, Packet p ) : void
HandlePacket ( byte packetID, Packet p ) : void
LineIntersections ( Vector2 p1, Vector2 p2 ) : List
LoadBlocks ( ) : void
PlayerOfID ( byte ID ) : PlayerEntity
PlayerUpdating ( Packet p ) : void
SetBlock ( int x, int y, short blockID, bool notify = true, byte metaData ) : void
SetBlockMetaData ( int x, int y, byte metadata ) : void
Update ( GameTime time ) : void
addToDrawList ( ) : void
addToList ( ) : void
addToUpdateList ( ) : void
inCamera ( ) : bool
removeFromDrawList ( ) : void
removeFromList ( ) : void
removeFromUpdateList ( ) : void

Private Methods

Method Description
LightUpAroundRadius ( int blockX, int blockY, int radius, int level = 1, int sign = 1 ) : void

Method Details

AbsoluteToTile() public static method

public static AbsoluteToTile ( Vector2 tile ) : Vector2
tile Vector2
return Vector2

Draw() public method

public Draw ( SpriteBatch sb ) : void
sb Microsoft.Xna.Framework.Graphics.SpriteBatch
return void

DroppedItemOfID() public static method

public static DroppedItemOfID ( short ID ) : EntityDroppedItem
ID short
return MiningGame.Code.Entities.EntityDroppedItem

GameWorld() public method

public GameWorld ( ) : System
return System

GetBlockAt() public static method

public static GetBlockAt ( float x, float y ) : BlockData
x float
y float
return MiningGame.Code.Blocks.BlockData

GetBlockAt() public static method

public static GetBlockAt ( int x, int y ) : BlockData
x int
y int
return MiningGame.Code.Blocks.BlockData

GetPlayer() public static method

public static GetPlayer ( byte id ) : PlayerEntity
id byte
return MiningGame.Code.Entities.PlayerEntity

HandleGameEvent() public static method

public static HandleGameEvent ( byte eventID, Packet p ) : void
eventID byte
p Packet
return void

HandlePacket() public static method

public static HandlePacket ( byte packetID, Packet p ) : void
packetID byte
p Packet
return void

LineIntersections() public static method

public static LineIntersections ( Vector2 p1, Vector2 p2 ) : List
p1 Vector2
p2 Vector2
return List

LoadBlocks() public static method

public static LoadBlocks ( ) : void
return void

PlayerOfID() public static method

public static PlayerOfID ( byte ID ) : PlayerEntity
ID byte
return MiningGame.Code.Entities.PlayerEntity

PlayerUpdating() public static method

public static PlayerUpdating ( Packet p ) : void
p Packet
return void

SetBlock() public static method

public static SetBlock ( int x, int y, short blockID, bool notify = true, byte metaData ) : void
x int
y int
blockID short
notify bool
metaData byte
return void

SetBlockMetaData() public static method

public static SetBlockMetaData ( int x, int y, byte metadata ) : void
x int
y int
metadata byte
return void

Update() public method

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

addToDrawList() public method

public addToDrawList ( ) : void
return void

addToList() public method

public addToList ( ) : void
return void

addToUpdateList() public method

public addToUpdateList ( ) : void
return void

inCamera() public method

public inCamera ( ) : bool
return bool

removeFromDrawList() public method

public removeFromDrawList ( ) : void
return void

removeFromList() public method

public removeFromList ( ) : void
return void

removeFromUpdateList() public method

public removeFromUpdateList ( ) : void
return void

Property Details

DroppedItems public static property

public static List DroppedItems
return List

GameMode public static property

public static ClientGameMode,MiningGame.Code.GameModes GameMode
return MiningGame.Code.GameModes.ClientGameMode

GameProjectiles public static property

public static List GameProjectiles
return List

OtherPlayers public static property

public static List OtherPlayers
return List

Random public static property

public static Random,System Random
return System.Random

ThePlayer public static property

public static PlayerController,MiningGame.Code ThePlayer
return PlayerController

WorldBlocks public static property

public static BlockData[,] WorldBlocks
return ].BlockData[