C# Class MiningGameServer.GameServer

Mostra file Open project: geel9/Minor-Destruction Class Usage Examples

Public Properties

Property Type Description
BlockSize int
DroppedItems List
GameMode MiningGameServer.GameModes.ServerGameMode
GameProjectiles MiningGameServer.Entities.ServerProjectile[]
NetworkPlayers List
Random System.Random
ScheduledUpdates List
ServerNetworkManager ServerNetworkManager
WorldBlocks ].BlockData[

Public Methods

Method Description
AbsoluteToTile ( Vector2 tile ) : Vector2
CanWalkThrough ( byte id ) : bool
DestroyBlockGib ( int x, int y ) : void

Destroys a block. Will cause gibbing.

DropItem ( ItemStack stack, Vector2 position, Vector2 velocity = default(Vector2), NetworkPlayer dropper = null ) : void
GameServer ( int port ) : System
GenerateCaves ( ) : void
GenerateOreVein ( int x, int y, byte id, int startX, int startY ) : void
GenerateOres ( ) : void
GenerateTree ( int x, int y ) : void
GenerateTrees ( ) : void
GenerateWorld ( ) : void
GetFreeDroppedItemIndex ( ) : short
GetFreeProjectileSlot ( ) : int
HandleGameEvent ( byte eventID, Packet p, NetworkPlayer player ) : void
HurtBlock ( int x, int y, byte damage ) : void

"Hurts" a block. Will automatically gib if enough damage is done.

ScheduleUpdate ( int x, int y, int frames = 5 ) : void
SendMessageToAll ( string message ) : void
SetBlock ( NetworkPlayer placer, int x, int y, short blockID, bool notify = true, byte metaData ) : void
SetBlock ( int x, int y, short blockID, bool notify = true, byte metaData ) : void
SetBlockMetaData ( int x, int y, byte metadata ) : void
UnscheduleUpdate ( int x, int y ) : void
Update ( GameTime time ) : void
UpdateScheduled ( int x, int y ) : bool

Private Methods

Method Description
GetBlockAt ( Vector2 location ) : BlockData
GetBlockAt ( float x, float y ) : BlockData
GetBlockAt ( int x, int y ) : BlockData

Method Details

AbsoluteToTile() public static method

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

CanWalkThrough() public static method

public static CanWalkThrough ( byte id ) : bool
id byte
return bool

DestroyBlockGib() public static method

Destroys a block. Will cause gibbing.
public static DestroyBlockGib ( int x, int y ) : void
x int X Co-ordinate of the block
y int Y Co-ordinate of the block
return void

DropItem() public static method

public static DropItem ( ItemStack stack, Vector2 position, Vector2 velocity = default(Vector2), NetworkPlayer dropper = null ) : void
stack ItemStack
position Vector2
velocity Vector2
dropper NetworkPlayer
return void

GameServer() public method

public GameServer ( int port ) : System
port int
return System

GenerateCaves() public static method

public static GenerateCaves ( ) : void
return void

GenerateOreVein() public static method

public static GenerateOreVein ( int x, int y, byte id, int startX, int startY ) : void
x int
y int
id byte
startX int
startY int
return void

GenerateOres() public static method

public static GenerateOres ( ) : void
return void

GenerateTree() public method

public GenerateTree ( int x, int y ) : void
x int
y int
return void

GenerateTrees() public static method

public static GenerateTrees ( ) : void
return void

GenerateWorld() public method

public GenerateWorld ( ) : void
return void

GetFreeDroppedItemIndex() public static method

public static GetFreeDroppedItemIndex ( ) : short
return short

GetFreeProjectileSlot() public static method

public static GetFreeProjectileSlot ( ) : int
return int

HandleGameEvent() public static method

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

HurtBlock() public static method

"Hurts" a block. Will automatically gib if enough damage is done.
public static HurtBlock ( int x, int y, byte damage ) : void
x int
y int
damage byte
return void

ScheduleUpdate() public static method

public static ScheduleUpdate ( int x, int y, int frames = 5 ) : void
x int
y int
frames int
return void

SendMessageToAll() public static method

public static SendMessageToAll ( string message ) : void
message string
return void

SetBlock() public static method

public static SetBlock ( NetworkPlayer placer, int x, int y, short blockID, bool notify = true, byte metaData ) : void
placer NetworkPlayer
x int
y int
blockID short
notify bool
metaData byte
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

UnscheduleUpdate() public static method

public static UnscheduleUpdate ( int x, int y ) : void
x int
y int
return void

Update() public method

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

UpdateScheduled() public static method

public static UpdateScheduled ( int x, int y ) : bool
x int
y int
return bool

Property Details

BlockSize public_oe static_oe property

public static int BlockSize
return int

DroppedItems public_oe static_oe property

public static List DroppedItems
return List

GameMode public_oe static_oe property

public static ServerGameMode,MiningGameServer.GameModes GameMode
return MiningGameServer.GameModes.ServerGameMode

GameProjectiles public_oe static_oe property

public static ServerProjectile[],MiningGameServer.Entities GameProjectiles
return MiningGameServer.Entities.ServerProjectile[]

NetworkPlayers public_oe static_oe property

public static List NetworkPlayers
return List

Random public_oe static_oe property

public static Random,System Random
return System.Random

ScheduledUpdates public_oe static_oe property

public static List ScheduledUpdates
return List

ServerNetworkManager public_oe static_oe property

public static ServerNetworkManager,MiningGameServer ServerNetworkManager
return ServerNetworkManager

WorldBlocks public_oe static_oe property

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