C# Класс fCraft.World

World instance
Наследование: IClassy
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
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

Свойство Тип Описание
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

Открытые методы

Метод Описание
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)

Приватные методы

Метод Описание
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

Описание методов

ChangeMap() публичный Метод

public ChangeMap ( [ newMap ) : void
newMap [
Результат void

CountPlayers() публичный Метод

Counts all players (optionally includes all hidden players).
public CountPlayers ( bool includeHiddenPlayers ) : int
includeHiddenPlayers bool
Результат int

CountVisiblePlayers() публичный Метод

Counts only the players who are not hidden from a given observer.
public CountVisiblePlayers ( [ observer ) : int
observer [
Результат int

DeleteLife() публичный Метод

public DeleteLife ( string name ) : void
name string
Результат void

DisableFireworkPhysics() публичный Метод

public DisableFireworkPhysics ( Player player, bool announce ) : void
player Player
announce bool
Результат void

DisableGunPhysics() публичный Метод

public DisableGunPhysics ( Player player, bool announce ) : void
player Player
announce bool
Результат void

DisablePlantPhysics() публичный Метод

public DisablePlantPhysics ( Player player, bool announce ) : void
player Player
announce bool
Результат void

DisableSandPhysics() публичный Метод

public DisableSandPhysics ( Player player, bool announce ) : void
player Player
announce bool
Результат void

DisableTNTPhysics() публичный Метод

public DisableTNTPhysics ( Player player, bool announce ) : void
player Player
announce bool
Результат void

DisableWaterPhysics() публичный Метод

public DisableWaterPhysics ( Player player, bool announce ) : void
player Player
announce bool
Результат void

EnableFireworkPhysics() публичный Метод

public EnableFireworkPhysics ( Player player, bool announce ) : void
player Player
announce bool
Результат void

EnableGunPhysics() публичный Метод

public EnableGunPhysics ( Player player, bool announce ) : void
player Player
announce bool
Результат void

EnablePlantPhysics() публичный Метод

public EnablePlantPhysics ( Player player, bool announce ) : void
player Player
announce bool
Результат void

EnableSandPhysics() публичный Метод

public EnableSandPhysics ( Player player, bool announce ) : void
player Player
announce bool
Результат void

EnableTNTPhysics() публичный Метод

public EnableTNTPhysics ( Player player, bool announce ) : void
player Player
announce bool
Результат void

EnableWaterPhysics() публичный Метод

public EnableWaterPhysics ( Player player, bool announce ) : void
player Player
announce bool
Результат void

FindPlayers() публичный Метод

public FindPlayers ( [ player, [ playerName ) : fCraft.Player[]
player [
playerName [
Результат fCraft.Player[]

Flush() публичный Метод

public Flush ( ) : void
Результат void

GenerateWoMConfig() публичный Метод

public GenerateWoMConfig ( bool sendMotd ) : string
sendMotd bool
Результат string

GetLife() публичный Метод

public GetLife ( string name ) : Life2DZone
name string
Результат Life2DZone

GetLifes() публичный Метод

public GetLifes ( ) : IEnumerable
Результат IEnumerable

GetNextPatrolTarget() публичный Метод

public GetNextPatrolTarget ( [ observer ) : Player
observer [
Результат Player

GetNextPatrolTarget() публичный Метод

public GetNextPatrolTarget ( [ observer, [ predicate, bool setLastPatrolTime ) : Player
observer [
predicate [
setLastPatrolTime bool
Результат Player

IsValidName() публичный статический Метод

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 [
Результат bool

LoadRealmState() публичный Метод

public LoadRealmState ( System.Xml.Linq.XElement el ) : void
el System.Xml.Linq.XElement
Результат void

Lock() публичный Метод

public Lock ( [ player ) : bool
player [
Результат bool

ReleasePlayer() публичный Метод

public ReleasePlayer ( [ player ) : bool
player [
Результат bool

SaveBackup() публичный Метод

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.
Результат bool

SaveMap() публичный Метод

public SaveMap ( ) : void
Результат void

SaveRealmState() публичный Метод

public SaveRealmState ( ) : System.Xml.Linq.XElement
Результат System.Xml.Linq.XElement

SaveRealmState() публичный Метод

public SaveRealmState ( string rootName ) : System.Xml.Linq.XElement
rootName string
Результат System.Xml.Linq.XElement

ToString() публичный Метод

public ToString ( ) : string
Результат string

TryAddLife() публичный Метод

public TryAddLife ( Life2DZone life ) : bool
life Life2DZone
Результат bool

Unlock() публичный Метод

public Unlock ( [ player ) : bool
player [
Результат bool

UpdatePlayerList() публичный Метод

Caches the player list to an array (Players -> PlayerList)
public UpdatePlayerList ( ) : void
Результат void

Описание свойств

CloudColor публичное свойство

public int CloudColor
Результат int

EdgeBlock публичное свойство

public Block EdgeBlock
Результат Block

Feeds публичное свойство

public Dictionary Feeds
Результат FeedData>.Dictionary

FireworkCount публичное свойство

public int FireworkCount
Результат int

GameOn публичное свойство

public bool GameOn
Результат bool

Games публичное свойство

public List Games
Результат List

Greeting публичное свойство

public string Greeting
Результат string

LockedBy публичное свойство

public string LockedBy
Результат string

LockedDate публичное свойство

public DateTime,System LockedDate
Результат System.DateTime

RealisticEnv публичное свойство

public bool RealisticEnv
Результат bool

RealmXMLRootName публичное свойство

public string RealmXMLRootName
Результат string

SideBlock публичное свойство

public Block SideBlock
Результат Block

ZombieGame публичное свойство

public bool ZombieGame
Результат bool

blockCache публичное свойство

public ConcurrentDictionary blockCache
Результат Vector3I>.ConcurrentDictionary

blueScore публичное свойство

public int blueScore
Результат int

blueTeam публичное свойство

public List blueTeam
Результат List

fireworkPhysics публичное свойство

public bool fireworkPhysics
Результат bool

footballPos публичное свойство

public Vector3I footballPos
Результат Vector3I

gameMode публичное свойство

public GameMode gameMode
Результат GameMode

gunPhysics публичное свойство

public bool gunPhysics
Результат bool

map публичное свойство

public Map,fCraft map
Результат Map

plantPhysics публичное свойство

public bool plantPhysics
Результат bool

positions публичное свойство

public Player[,fCraft positions
Результат fCraft.Player[

redScore публичное свойство

public int redScore
Результат int

redTeam публичное свойство

public List redTeam
Результат List

sandPhysics публичное свойство

public bool sandPhysics
Результат bool

tntPhysics публичное свойство

public bool tntPhysics
Результат bool

waterPhysics публичное свойство

public bool waterPhysics
Результат bool