C# Class Dwarrowdelf.Server.GameEngine

Inheritance: System.MarshalByRefObject, IGame
显示文件 Open project: tomba/dwarrowdelf Class Usage Examples

Private Properties

Property Type Description
CheckForStartTick void
CommonInit void
GetUserID int
InitPlayer void
IsTimeToStartTick bool
MainWork bool
MaxMoveTimerCallback void
OnNewConnection void
OnPlayerDisconnected void
OnPlayerProceedTurnReceived void
OnTickEnded void
OnTickStarted void
OnTurnEnded void
OnTurnStarting void
OnUserDisconnected void
RemovePlayer void
SetupAfterLoad void
VerifyAccess void
_IsTimeToStartTick bool
_MaxMoveTimerCallback void
_MinTickTimerCallback void
_OnNewConnection void

Public Methods

Method Description
Connect ( DirectConnection clientConnection ) : void
InitializeLifetimeService ( ) : object
Load ( string gameDir, System.Guid id ) : GameEngine
LoadClientData ( int playerID, System.Guid id ) : string
Run ( EventWaitHandle serverStartWaitHandle ) : void
Save ( ) : void
SaveClientData ( int playerID, System.Guid id, string data ) : void
SetMinTickTime ( System.TimeSpan minTickTime ) : void
Signal ( ) : void
Stop ( ) : void

Protected Methods

Method Description
AddPlayer ( Player player ) : void
GameEngine ( SaveGameContext ctx ) : System
GameEngine ( string gameDir, GameOptions options ) : System

Private Methods

Method Description
CheckForStartTick ( ) : void
CommonInit ( ) : void
GetUserID ( string name ) : int
InitPlayer ( Player player ) : void
IsTimeToStartTick ( ) : bool
MainWork ( ) : bool
MaxMoveTimerCallback ( ) : void
OnNewConnection ( object state ) : void
OnPlayerDisconnected ( Player player ) : void
OnPlayerProceedTurnReceived ( Player player ) : void
OnTickEnded ( ) : void
OnTickStarted ( ) : void
OnTurnEnded ( LivingObject living ) : void
OnTurnStarting ( LivingObject living ) : void
OnUserDisconnected ( User user ) : void
RemovePlayer ( Player player ) : void
SetupAfterLoad ( string gameDir ) : void
VerifyAccess ( ) : void
_IsTimeToStartTick ( ) : bool
_MaxMoveTimerCallback ( object stateInfo ) : void
_MinTickTimerCallback ( object stateInfo ) : void
_OnNewConnection ( IConnection connection ) : void

Method Details

AddPlayer() protected method

protected AddPlayer ( Player player ) : void
player Player
return void

Connect() public method

public Connect ( DirectConnection clientConnection ) : void
clientConnection DirectConnection
return void

GameEngine() protected method

protected GameEngine ( SaveGameContext ctx ) : System
ctx SaveGameContext
return System

GameEngine() protected method

protected GameEngine ( string gameDir, GameOptions options ) : System
gameDir string
options GameOptions
return System

InitializeLifetimeService() public method

public InitializeLifetimeService ( ) : object
return object

Load() public static method

public static Load ( string gameDir, System.Guid id ) : GameEngine
gameDir string
id System.Guid
return GameEngine

LoadClientData() public method

public LoadClientData ( int playerID, System.Guid id ) : string
playerID int
id System.Guid
return string

Run() public method

public Run ( EventWaitHandle serverStartWaitHandle ) : void
serverStartWaitHandle System.Threading.EventWaitHandle
return void

Save() public method

public Save ( ) : void
return void

SaveClientData() public method

public SaveClientData ( int playerID, System.Guid id, string data ) : void
playerID int
id System.Guid
data string
return void

SetMinTickTime() public method

public SetMinTickTime ( System.TimeSpan minTickTime ) : void
minTickTime System.TimeSpan
return void

Signal() public method

public Signal ( ) : void
return void

Stop() public method

public Stop ( ) : void
return void