Interface IGame
A top-level interface to interact with the game.
Namespace: AGS.API
Assembly: AGS.API.dll
Syntax
public interface IGame
Properties
| Improve this Doc View SourceAudio
Game's audio system (the entry point for interacting with everything sound related).
Declaration
IAudioSystem Audio { get; }
Property Value
Type | Description |
---|---|
IAudioSystem | The audio. |
Coordinates
Utility methods to help convert between different coordinate systems.
Declaration
ICoordinates Coordinates { get; }
Property Value
Type | Description |
---|---|
ICoordinates | The coordinates. |
Events
Gets the top-level game events (game loaded, on repeatedly execute, etc).
Declaration
IGameEvents Events { get; }
Property Value
Type | Description |
---|---|
IGameEvents | The events. |
Factory
Gets the factory for loading/creating all of the game objects.
Declaration
IGameFactory Factory { get; }
Property Value
Type | Description |
---|---|
IGameFactory | The factory. |
GameLoop
Gets the game loop. This is used by the engine for updating the state every tick, and should not be used by the player.
Declaration
IGameLoop GameLoop { get; }
Property Value
Type | Description |
---|---|
IGameLoop | The game loop. |
HitTest
Gets the object under the mouse's position.
Declaration
IHitTest HitTest { get; }
Property Value
Type | Description |
---|---|
IHitTest | The hit test. |
Input
Game's input (mouse, keyboard, etc).
Declaration
IInput Input { get; }
Property Value
Type | Description |
---|---|
IInput | The input. |
RenderLoop
Gets the render loop. This is used by the engine for rendering to the screen on each tick, and should not be used by the player.
Declaration
IRendererLoop RenderLoop { get; }
Property Value
Type | Description |
---|---|
IRendererLoop | The renderer loop. |
RenderPipeline
Gets the render pipeline, which is responsible of collecting drawing instructions from all of the renderers and passing it on to the render loop.
Declaration
IRenderPipeline RenderPipeline { get; }
Property Value
Type | Description |
---|---|
IRenderPipeline | The render pipeline. |
Resolver
Allows retrieving various systems from the engine.
Declaration
IResolver Resolver { get; }
Property Value
Type | Description |
---|---|
IResolver | The resolver. |
SaveLoad
Interface for saving/loading the game.
Declaration
ISaveLoad SaveLoad { get; }
Property Value
Type | Description |
---|---|
ISaveLoad | The save load. |
Settings
Gets the game's settings.
Declaration
IRuntimeSettings Settings { get; }
Property Value
Type | Description |
---|---|
IRuntimeSettings | The settings. |
State
Gets the game's state (rooms, objects, etc).
Declaration
IGameState State { get; }
Property Value
Type | Description |
---|---|
IGameState | The state. |
Methods
| Improve this Doc View SourceFind<TEntity>(String)
Find the entity with the specified id and type.
Declaration
TEntity Find<TEntity>(string id)
where TEntity : class, IEntity
Parameters
Type | Name | Description |
---|---|---|
System.String | id | The entity's unique identifier. |
Returns
Type | Description |
---|---|
TEntity | The entity if found, null if no entity exists with that id. |
Type Parameters
Name | Description |
---|---|
TEntity | The entity's type. |
Quit()
Quits the game. Note that this should not be used on IOS as IOS guidelines do not allow a button for quitting the game.
Declaration
void Quit()
Start()
Starts the game.
Declaration
void Start()