Arcade
|
Base class for all arcade games. More...
Public Member Functions | |
delegate void | LoadGameAsyncCallback (IGame game) |
void | PushPreUpdate (Action action) |
void | Reset () |
Manually unpauses and resets the game. More... | |
void | RenderPausedFrame () |
Renders the last frame shown before the game became paused. More... | |
Public Member Functions inherited from GameAPI.Sandboxing.Remotable | |
void | Dispose () |
Static Public Member Functions | |
static void | RegisterAPIAssembly (Assembly asm) |
static void | FromAssemblyAsync (string path, string[] refPaths, Sandbox sandbox, LoadGameAsyncCallback callback) |
static IGame | FromAssembly (string path, string[] refPaths, Sandbox sandbox) |
static void | FromCSSourcesAsync (string baseDir, Sandbox sandbox, LoadGameAsyncCallback callback) |
static IGame | FromCSSources (string baseDir, Sandbox sandbox) |
static void | FromPackageAsync< TCabinet > (Sandbox sandbox, Stream stream, TCabinet cabinet, LoadGameAsyncCallback callback) |
static IGame | FromPackage< TCabinet > (Sandbox sandbox, Stream stream, TCabinet cabinet=null) |
Public Attributes | |
const int | SavedStateSizeLimit = 65535 |
Maximum size of a game save state, in bytes. More... | |
Protected Member Functions | |
virtual void | OnRegisterResourceTypes (ResourceManager library) |
Used to register custom resource types to be used by the game. More... | |
virtual void | OnInitialize () |
Called when the game is about to start. More... | |
virtual void | OnLoadResources (Resources volume) |
Called when game resources are available to be loaded. More... | |
virtual void | OnPause () |
Called when the game is paused. More... | |
virtual void | OnReset () |
Called when the game resets and first begins. More... | |
virtual void | OnResume () |
Called when the game is resumed from a paused state. More... | |
virtual void | OnUpdate () |
Called at regular intervals, specified by UpdateRate, just before a frame is drawn. More... | |
virtual void | OnRender () |
Called at regular intervals, specified by UpdateRate, when a frame is being drawn. More... | |
virtual void | OnRenderPauseScreen (double timeUntilReset) |
Called in the place of OnRender() when the game is paused, with timeUntilReset in seconds. More... | |
virtual void | OnSaveState (BinaryWriter writer) |
Allows game state to be transferred between players so that they can pass control to each other when overridden along with OnLoadState(). More... | |
virtual void | OnLoadState (BinaryReader reader) |
Allows game state to be transferred between players so that they can pass control to each other when overridden along with OnSaveState(). More... | |
Protected Member Functions inherited from GameAPI.Sandboxing.Remotable | |
virtual void | OnDispose () |
Properties | |
IGameInfo | GameInfo [get] |
Gets a structure containing general information about the game. More... | |
IGraphicsInfo | GraphicsInfo [get] |
Gets a structure containing information about the graphical specifications of the game. More... | |
int | UpdateRate [get] |
Gets the number of times this game updates per second. More... | |
TimeSpan | TimeStep [get] |
Gets the period between game updates in seconds. More... | |
bool | IsPaused [get] |
If true, the game is in a paused state and is not updating. More... | |
ulong | Tick [get, set] |
Gets the number of updates since the game first began. More... | |
double | Time [get] |
Gets the estimated number of seconds since the game first began. More... | |
abstract int | LastFrameSize [get] |
Gets the number of bytes needed to stream the previous frame. More... | |
bool | CanTransferState [get] |
If true, this game has implemented game state transmission between clients. More... | |
bool | ResetWhenChangePlayer [get] |
If true, this game hasn't implemented game state transmission and so must reset when changing player. More... | |
Properties inherited from GameAPI.IGame | |
bool | IsPaused [get] |
IGameInfo | GameInfo [get] |
IGraphicsInfo | GraphicsInfo [get] |
Events | |
EventHandler | Paused |
EventHandler | Restarted |
EventHandler | Resumed |
Events inherited from GameAPI.IGame | |
EventHandler | Restarted |
Base class for all arcade games.
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
TCabinet | : | class | |
TCabinet | : | ICabinet |
|
inlinestatic |
TCabinet | : | class | |
TCabinet | : | ICabinet |
delegate void GameAPI.GameBase.LoadGameAsyncCallback | ( | IGame | game | ) |
|
inlineprotectedvirtual |
Called when the game is about to start.
|
inlineprotectedvirtual |
Called when game resources are available to be loaded.
|
inlineprotectedvirtual |
Allows game state to be transferred between players so that they can pass control to each other when overridden along with OnSaveState().
reader | BinaryReader to read game state from. |
|
inlineprotectedvirtual |
Called when the game is paused.
|
inlineprotectedvirtual |
Used to register custom resource types to be used by the game.
library | Resource archive library to register custom resource types to. |
|
inlineprotectedvirtual |
Called at regular intervals, specified by UpdateRate, when a frame is being drawn.
Reimplemented in GameAPI.BudgetBoy.Game.
|
inlineprotectedvirtual |
Called in the place of OnRender() when the game is paused, with timeUntilReset in seconds.
Reimplemented in GameAPI.BudgetBoy.Game.
|
inlineprotectedvirtual |
Called when the game resets and first begins.
|
inlineprotectedvirtual |
Called when the game is resumed from a paused state.
|
inlineprotectedvirtual |
Allows game state to be transferred between players so that they can pass control to each other when overridden along with OnLoadState().
writer | BinaryWriter to write game state to. |
|
inlineprotectedvirtual |
Called at regular intervals, specified by UpdateRate, just before a frame is drawn.
Reimplemented in GameAPI.BudgetBoy.Game.
|
inline |
Implements GameAPI.IGame.
|
inlinestatic |
|
inline |
Renders the last frame shown before the game became paused.
|
inline |
Manually unpauses and resets the game.
Implements GameAPI.IGame.
const int GameAPI.GameBase.SavedStateSizeLimit = 65535 |
Maximum size of a game save state, in bytes.
|
get |
If true, this game has implemented game state transmission between clients.
|
get |
Gets a structure containing general information about the game.
|
get |
Gets a structure containing information about the graphical specifications of the game.
|
get |
If true, the game is in a paused state and is not updating.
|
get |
Gets the number of bytes needed to stream the previous frame.
|
get |
If true, this game hasn't implemented game state transmission and so must reset when changing player.
|
getset |
Gets the number of updates since the game first began.
|
get |
Gets the estimated number of seconds since the game first began.
|
get |
Gets the period between game updates in seconds.
|
get |
Gets the number of times this game updates per second.
EventHandler GameAPI.GameBase.Paused |
EventHandler GameAPI.GameBase.Restarted |
EventHandler GameAPI.GameBase.Resumed |