Метод | Описание | |
---|---|---|
Initialize ( ) : void |
Creates a new game. The base directory will be the location of the .exe file that was run.
|
|
Initialize ( String basedir ) : void |
Creates a new game.
|
|
PathTo ( IEnumerable |
Builds a full system path to the specified location from an IEnumerable of path components.
|
|
PathTo ( String location ) : String |
Returns a full system path to the given location. Properly accounts for system differences. Regardless of your development platform, use the foreslash ("/") to separate path elements.
|
|
Process ( ) : void |
Processes the game's core subsystems. Game function should not be called except by expert users.
|
|
PumpMessages ( ) : void |
Pumps game messages. For expert users only!
|
|
RegisterTask ( IScheduledTask task ) : void |
Thread Safe. Registers a new scheduled task to be run every step.
|
|
Run ( ) : void |
Starts the game's processing and immediately returns. For expert users only!
|
|
Run ( |
Starts the game's processing. Make sure that the game has been initialized through a call to Initialize() first. Game call will not return until the user has quit the game.
|
|
SendMessage ( IMessageReceiver target, String messagename ) : void |
Thread safe. Send a message to a particular target.
|
|
SendMessage ( String channel, String messagename ) : void |
Thread safe. Broadcasts a message to a channel.
|
|
SetAudioSystem ( String sys ) : void |
Sets the audio engine to use.
|
|
SetInputSystem ( String sys ) : void |
Sets the input system to use. WARNING: Many input systems (such as OpenTK) reference the rendering system for a window handle. Consult the documentation of your input system for details, but in general be sure to initialize your rendering system first.
|
|
SetRenderSystem ( String sys ) : void |
Sets the rendering engine to use.
|
|
SetTick ( System.Int64 newTickValue ) : System.Int64 |
Used to set the value of the game loop's current tick. This is NOT being used as the property's setter because it must be stressed that this is a BAD THING TO MESS WITH. Only do so in established, defined situations (for example, setting the tick value of a restored saved game).
|
|
Step ( ) : void |
Processes a single step of game code. This will be called every frame for realtime games. Should not be called except by expert users. Even they should reconsider.
|
|
Stop ( ) : void |
Stops the game from running. For expert users only!
|
|
SubscribeToChannel ( String chan, IMessageReceiver subscriber ) : void |
Thread safe. Subscribes a message receiver to a particular channel. If an object is subscribed to a channel, it MUST be unsubscribed on destruction. |
|
SubscribeToChannels ( IMessageReceiver subscriber ) : void |
Thread safe. Automatically subscribe to all channels specified in class attributes. If an object is subscribed to a channel, it MUST be unsubscribed on destruction. |
|
Terminate ( ) : void |
Call Game when your application's done. Disposes of Game and fires any OnGameTermination events.
|
|
UnregisterTask ( IScheduledTask task ) : void |
Thread Safe. Unregisters a task from the task queue.
|
|
Unsubscribe ( IMessageReceiver subscriber ) : void |
Thread safe. Unsubscribes an object from the whole post system. This object will no longer receive messages.
|
public static Initialize ( String basedir ) : void | ||
basedir | String | The base application directory. |
Результат | void |
public static PathTo ( IEnumerable |
||
location | IEnumerable |
An enumerable collection of path components. |
Результат | String |
public static PathTo ( String location ) : String | ||
location | String | The path to generate off of the game's BaseDirectory. |
Результат | String |
public static RegisterTask ( IScheduledTask task ) : void | ||
task | IScheduledTask | The task to schedule. |
Результат | void |
public static Run ( |
||
loop | The AbstractGameLoop that's responsible for delegating to game logic. | |
Результат | void |
public static SendMessage ( IMessageReceiver target, String messagename ) : void | ||
target | IMessageReceiver | The target to send the message to. |
messagename | String | The name of the message to send |
Результат | void |
public static SendMessage ( String channel, String messagename ) : void | ||
channel | String | The channel to send to |
messagename | String | The name of the message to send |
Результат | void |
public static SetAudioSystem ( String sys ) : void | ||
sys | String | The name of the audio engine. Default is "OpenTK". |
Результат | void |
public static SetInputSystem ( String sys ) : void | ||
sys | String | The name of the input system to use. |
Результат | void |
public static SetRenderSystem ( String sys ) : void | ||
sys | String | The name of the rendering engine. Default is "OpenTK". |
Результат | void |
public static SetTick ( System.Int64 newTickValue ) : System.Int64 | ||
newTickValue | System.Int64 | The new value of the current tick. |
Результат | System.Int64 |
public static SubscribeToChannel ( String chan, IMessageReceiver subscriber ) : void | ||
chan | String | The channel to subscribe to. |
subscriber | IMessageReceiver | The object that will receive messages. |
Результат | void |
public static SubscribeToChannels ( IMessageReceiver subscriber ) : void | ||
subscriber | IMessageReceiver | The object to create subscriptions for. |
Результат | void |
public static UnregisterTask ( IScheduledTask task ) : void | ||
task | IScheduledTask | The task to unregister. |
Результат | void |
public static Unsubscribe ( IMessageReceiver subscriber ) : void | ||
subscriber | IMessageReceiver | The object to unsubscribe. |
Результат | void |