C# Class MiningGameServer.GameServer

Afficher le fichier Open project: geel9/Minor-Destruction Class Usage Examples

Méthodes publiques

Свойство 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[

Méthodes publiques

Méthode 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

Méthode Description
GetBlockAt ( Vector2 location ) : BlockData
GetBlockAt ( float x, float y ) : BlockData
GetBlockAt ( int x, int y ) : BlockData

Method Details

AbsoluteToTile() public static méthode

public static AbsoluteToTile ( Vector2 tile ) : Vector2
tile Vector2
Résultat Vector2

CanWalkThrough() public static méthode

public static CanWalkThrough ( byte id ) : bool
id byte
Résultat bool

DestroyBlockGib() public static méthode

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
Résultat void

DropItem() public static méthode

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

GameServer() public méthode

public GameServer ( int port ) : System
port int
Résultat System

GenerateCaves() public static méthode

public static GenerateCaves ( ) : void
Résultat void

GenerateOreVein() public static méthode

public static GenerateOreVein ( int x, int y, byte id, int startX, int startY ) : void
x int
y int
id byte
startX int
startY int
Résultat void

GenerateOres() public static méthode

public static GenerateOres ( ) : void
Résultat void

GenerateTree() public méthode

public GenerateTree ( int x, int y ) : void
x int
y int
Résultat void

GenerateTrees() public static méthode

public static GenerateTrees ( ) : void
Résultat void

GenerateWorld() public méthode

public GenerateWorld ( ) : void
Résultat void

GetFreeDroppedItemIndex() public static méthode

public static GetFreeDroppedItemIndex ( ) : short
Résultat short

GetFreeProjectileSlot() public static méthode

public static GetFreeProjectileSlot ( ) : int
Résultat int

HandleGameEvent() public static méthode

public static HandleGameEvent ( byte eventID, Packet p, NetworkPlayer player ) : void
eventID byte
p Packet
player NetworkPlayer
Résultat void

HurtBlock() public static méthode

"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
Résultat void

ScheduleUpdate() public static méthode

public static ScheduleUpdate ( int x, int y, int frames = 5 ) : void
x int
y int
frames int
Résultat void

SendMessageToAll() public static méthode

public static SendMessageToAll ( string message ) : void
message string
Résultat void

SetBlock() public static méthode

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
Résultat void

SetBlock() public static méthode

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
Résultat void

SetBlockMetaData() public static méthode

public static SetBlockMetaData ( int x, int y, byte metadata ) : void
x int
y int
metadata byte
Résultat void

UnscheduleUpdate() public static méthode

public static UnscheduleUpdate ( int x, int y ) : void
x int
y int
Résultat void

Update() public méthode

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

UpdateScheduled() public static méthode

public static UpdateScheduled ( int x, int y ) : bool
x int
y int
Résultat bool

Property Details

BlockSize public_oe static_oe property

public static int BlockSize
Résultat int

DroppedItems public_oe static_oe property

public static List DroppedItems
Résultat List

GameMode public_oe static_oe property

public static ServerGameMode,MiningGameServer.GameModes GameMode
Résultat MiningGameServer.GameModes.ServerGameMode

GameProjectiles public_oe static_oe property

public static ServerProjectile[],MiningGameServer.Entities GameProjectiles
Résultat MiningGameServer.Entities.ServerProjectile[]

NetworkPlayers public_oe static_oe property

public static List NetworkPlayers
Résultat List

Random public_oe static_oe property

public static Random,System Random
Résultat System.Random

ScheduledUpdates public_oe static_oe property

public static List ScheduledUpdates
Résultat List

ServerNetworkManager public_oe static_oe property

public static ServerNetworkManager,MiningGameServer ServerNetworkManager
Résultat ServerNetworkManager

WorldBlocks public_oe static_oe property

public static BlockData[,] WorldBlocks
Résultat ].BlockData[