C# Class fCraft.World

World instance
Inheritance: IClassy
Afficher le fichier Open project: GlennMR/800craft Class Usage Examples

Méthodes publiques

Свойство Type Description
CloudColor int
EdgeBlock Block
Feeds FeedData>.Dictionary
FireworkCount int
GameOn bool
Games List
Greeting string
LockedBy string
LockedDate System.DateTime
RealisticEnv bool
RealmXMLRootName string
SideBlock Block
ZombieGame bool
blockCache Vector3I>.ConcurrentDictionary
blueScore int
blueTeam List
fireworkPhysics bool
footballPos Vector3I
gameMode GameMode
gunPhysics bool
map Map
plantPhysics bool
positions fCraft.Player[
redScore int
redTeam List
sandPhysics bool
tntPhysics bool
waterPhysics bool

Private Properties

Свойство Type Description
AcceptPlayer Map
AddPhysicsTask void
AddPlantTask void
AddTask void
AddTasksFromNewMap void
CheckIfPhysicsStarted void
CheckIfToStopPhysics void
DeleteOldBackups void
EndFlushMapBuffer void
FindPlayerExact Player
LoadMap Map
SaveTask void
StartScheduler void
StartTasks void
StopSchedulers void
StopTasks void
UnloadMap void
UpdateTask void
World System

Méthodes publiques

Méthode Description
ChangeMap ( [ newMap ) : void
CountPlayers ( bool includeHiddenPlayers ) : int

Counts all players (optionally includes all hidden players).

CountVisiblePlayers ( [ observer ) : int

Counts only the players who are not hidden from a given observer.

DeleteLife ( string name ) : void
DisableFireworkPhysics ( Player player, bool announce ) : void
DisableGunPhysics ( Player player, bool announce ) : void
DisablePlantPhysics ( Player player, bool announce ) : void
DisableSandPhysics ( Player player, bool announce ) : void
DisableTNTPhysics ( Player player, bool announce ) : void
DisableWaterPhysics ( Player player, bool announce ) : void
EnableFireworkPhysics ( Player player, bool announce ) : void
EnableGunPhysics ( Player player, bool announce ) : void
EnablePlantPhysics ( Player player, bool announce ) : void
EnableSandPhysics ( Player player, bool announce ) : void
EnableTNTPhysics ( Player player, bool announce ) : void
EnableWaterPhysics ( Player player, bool announce ) : void
FindPlayers ( [ player, [ playerName ) : fCraft.Player[]
Flush ( ) : void
GenerateWoMConfig ( bool sendMotd ) : string
GetLife ( string name ) : Life2DZone
GetLifes ( ) : IEnumerable
GetNextPatrolTarget ( [ observer ) : Player
GetNextPatrolTarget ( [ observer, [ predicate, bool setLastPatrolTime ) : Player
IsValidName ( [ name ) : bool

Ensures that player name has the correct length (2-16 characters) and character set (alphanumeric chars and underscores allowed).

LoadRealmState ( System.Xml.Linq.XElement el ) : void
Lock ( [ player ) : bool
ReleasePlayer ( [ player ) : bool
SaveBackup ( [ targetName ) : bool

Makes a copy of the current map file associated with this world. This does NOT save map to disk, and does NOT guarantee that the most up-to-date copy of the map was backed up.

SaveMap ( ) : void
SaveRealmState ( ) : System.Xml.Linq.XElement
SaveRealmState ( string rootName ) : System.Xml.Linq.XElement
ToString ( ) : string
TryAddLife ( Life2DZone life ) : bool
Unlock ( [ player ) : bool
UpdatePlayerList ( ) : void

Caches the player list to an array (Players -> PlayerList)

Private Methods

Méthode Description
AcceptPlayer ( [ player, bool announce ) : Map
AddPhysicsTask ( PhysicsTask task, int Delay ) : void
AddPlantTask ( short x, short y, short z ) : void
AddTask ( TaskCategory cat, PhysicsTask task, int Delay ) : void
AddTasksFromNewMap ( ) : void
CheckIfPhysicsStarted ( ) : void
CheckIfToStopPhysics ( ) : void
DeleteOldBackups ( [ directory ) : void
EndFlushMapBuffer ( ) : void
FindPlayerExact ( [ playerName ) : Player
LoadMap ( ) : Map
SaveTask ( SchedulerTask task ) : void
StartScheduler ( TaskCategory cat ) : void
StartTasks ( ) : void
StopSchedulers ( ) : void
StopTasks ( ) : void
UnloadMap ( bool expectedPendingFlag ) : void
UpdateTask ( SchedulerTask task ) : void
World ( [ name ) : System

Method Details

ChangeMap() public méthode

public ChangeMap ( [ newMap ) : void
newMap [
Résultat void

CountPlayers() public méthode

Counts all players (optionally includes all hidden players).
public CountPlayers ( bool includeHiddenPlayers ) : int
includeHiddenPlayers bool
Résultat int

CountVisiblePlayers() public méthode

Counts only the players who are not hidden from a given observer.
public CountVisiblePlayers ( [ observer ) : int
observer [
Résultat int

DeleteLife() public méthode

public DeleteLife ( string name ) : void
name string
Résultat void

DisableFireworkPhysics() public méthode

public DisableFireworkPhysics ( Player player, bool announce ) : void
player Player
announce bool
Résultat void

DisableGunPhysics() public méthode

public DisableGunPhysics ( Player player, bool announce ) : void
player Player
announce bool
Résultat void

DisablePlantPhysics() public méthode

public DisablePlantPhysics ( Player player, bool announce ) : void
player Player
announce bool
Résultat void

DisableSandPhysics() public méthode

public DisableSandPhysics ( Player player, bool announce ) : void
player Player
announce bool
Résultat void

DisableTNTPhysics() public méthode

public DisableTNTPhysics ( Player player, bool announce ) : void
player Player
announce bool
Résultat void

DisableWaterPhysics() public méthode

public DisableWaterPhysics ( Player player, bool announce ) : void
player Player
announce bool
Résultat void

EnableFireworkPhysics() public méthode

public EnableFireworkPhysics ( Player player, bool announce ) : void
player Player
announce bool
Résultat void

EnableGunPhysics() public méthode

public EnableGunPhysics ( Player player, bool announce ) : void
player Player
announce bool
Résultat void

EnablePlantPhysics() public méthode

public EnablePlantPhysics ( Player player, bool announce ) : void
player Player
announce bool
Résultat void

EnableSandPhysics() public méthode

public EnableSandPhysics ( Player player, bool announce ) : void
player Player
announce bool
Résultat void

EnableTNTPhysics() public méthode

public EnableTNTPhysics ( Player player, bool announce ) : void
player Player
announce bool
Résultat void

EnableWaterPhysics() public méthode

public EnableWaterPhysics ( Player player, bool announce ) : void
player Player
announce bool
Résultat void

FindPlayers() public méthode

public FindPlayers ( [ player, [ playerName ) : fCraft.Player[]
player [
playerName [
Résultat fCraft.Player[]

Flush() public méthode

public Flush ( ) : void
Résultat void

GenerateWoMConfig() public méthode

public GenerateWoMConfig ( bool sendMotd ) : string
sendMotd bool
Résultat string

GetLife() public méthode

public GetLife ( string name ) : Life2DZone
name string
Résultat Life2DZone

GetLifes() public méthode

public GetLifes ( ) : IEnumerable
Résultat IEnumerable

GetNextPatrolTarget() public méthode

public GetNextPatrolTarget ( [ observer ) : Player
observer [
Résultat Player

GetNextPatrolTarget() public méthode

public GetNextPatrolTarget ( [ observer, [ predicate, bool setLastPatrolTime ) : Player
observer [
predicate [
setLastPatrolTime bool
Résultat Player

IsValidName() public static méthode

Ensures that player name has the correct length (2-16 characters) and character set (alphanumeric chars and underscores allowed).
public static IsValidName ( [ name ) : bool
name [
Résultat bool

LoadRealmState() public méthode

public LoadRealmState ( System.Xml.Linq.XElement el ) : void
el System.Xml.Linq.XElement
Résultat void

Lock() public méthode

public Lock ( [ player ) : bool
player [
Résultat bool

ReleasePlayer() public méthode

public ReleasePlayer ( [ player ) : bool
player [
Résultat bool

SaveBackup() public méthode

Makes a copy of the current map file associated with this world. This does NOT save map to disk, and does NOT guarantee that the most up-to-date copy of the map was backed up.
targetName is null.
public SaveBackup ( [ targetName ) : bool
targetName [ Target file name.
Résultat bool

SaveMap() public méthode

public SaveMap ( ) : void
Résultat void

SaveRealmState() public méthode

public SaveRealmState ( ) : System.Xml.Linq.XElement
Résultat System.Xml.Linq.XElement

SaveRealmState() public méthode

public SaveRealmState ( string rootName ) : System.Xml.Linq.XElement
rootName string
Résultat System.Xml.Linq.XElement

ToString() public méthode

public ToString ( ) : string
Résultat string

TryAddLife() public méthode

public TryAddLife ( Life2DZone life ) : bool
life Life2DZone
Résultat bool

Unlock() public méthode

public Unlock ( [ player ) : bool
player [
Résultat bool

UpdatePlayerList() public méthode

Caches the player list to an array (Players -> PlayerList)
public UpdatePlayerList ( ) : void
Résultat void

Property Details

CloudColor public_oe property

public int CloudColor
Résultat int

EdgeBlock public_oe property

public Block EdgeBlock
Résultat Block

Feeds public_oe property

public Dictionary Feeds
Résultat FeedData>.Dictionary

FireworkCount public_oe property

public int FireworkCount
Résultat int

GameOn public_oe property

public bool GameOn
Résultat bool

Games public_oe property

public List Games
Résultat List

Greeting public_oe property

public string Greeting
Résultat string

LockedBy public_oe property

public string LockedBy
Résultat string

LockedDate public_oe property

public DateTime,System LockedDate
Résultat System.DateTime

RealisticEnv public_oe property

public bool RealisticEnv
Résultat bool

RealmXMLRootName public_oe property

public string RealmXMLRootName
Résultat string

SideBlock public_oe property

public Block SideBlock
Résultat Block

ZombieGame public_oe property

public bool ZombieGame
Résultat bool

blockCache public_oe property

public ConcurrentDictionary blockCache
Résultat Vector3I>.ConcurrentDictionary

blueScore public_oe property

public int blueScore
Résultat int

blueTeam public_oe property

public List blueTeam
Résultat List

fireworkPhysics public_oe property

public bool fireworkPhysics
Résultat bool

footballPos public_oe property

public Vector3I footballPos
Résultat Vector3I

gameMode public_oe property

public GameMode gameMode
Résultat GameMode

gunPhysics public_oe property

public bool gunPhysics
Résultat bool

map public_oe property

public Map,fCraft map
Résultat Map

plantPhysics public_oe property

public bool plantPhysics
Résultat bool

positions public_oe property

public Player[,fCraft positions
Résultat fCraft.Player[

redScore public_oe property

public int redScore
Résultat int

redTeam public_oe property

public List redTeam
Résultat List

sandPhysics public_oe property

public bool sandPhysics
Résultat bool

tntPhysics public_oe property

public bool tntPhysics
Résultat bool

waterPhysics public_oe property

public bool waterPhysics
Résultat bool