Class Game
Assembly: PopcorningGuineaPig.Engine.dll
Syntax
public abstract class Game : ISceneHost, ISceneCommandHandler
Constructors
|
Edit this page
View Source
Game()
Declaration
Properties
|
Edit this page
View Source
AssetRegistry
Declaration
public IAssetRegistry AssetRegistry { get; protected set; }
Property Value
|
Edit this page
View Source
Declaration
public IInputService InputService { get; protected set; }
Property Value
|
Edit this page
View Source
Instance
Declaration
public static Game Instance { get; }
Property Value
|
Edit this page
View Source
Localization
Declaration
public ILocalizationService Localization { get; protected set; }
Property Value
|
Edit this page
View Source
SceneManager
Declaration
public SceneManager SceneManager { get; protected set; }
Property Value
|
Edit this page
View Source
SoundPlayer
Declaration
public ISoundPlayer SoundPlayer { get; protected set; }
Property Value
|
Edit this page
View Source
VFS
Runtime asset resolver. Set during Init(int, int, int, string); loaders (scenes,
asset registry, TMX/Quake/localization/sound) read from this instead of
calling File.* directly so packed .cecal builds work transparently.
Null when no .cecal archive is present next to the executable — every
loader has a null-VFS branch that preserves legacy behavior byte-for-byte
for games that never opt in to the asset archive pipeline.
Declaration
public IVirtualFileSystem? VFS { get; protected set; }
Property Value
|
Edit this page
View Source
ViewportHeight
Declaration
public int ViewportHeight { get; }
Property Value
|
Edit this page
View Source
ViewportWidth
Declaration
public int ViewportWidth { get; }
Property Value
Methods
|
Edit this page
View Source
CleanupResources()
Declaration
protected virtual void CleanupResources()
|
Edit this page
View Source
Init(int, int, int, string)
Declaration
public void Init(int x, int y, int fps = 60, string title = "Game Title")
Parameters
|
Edit this page
View Source
Load()
Declaration
public virtual void Load()
|
Edit this page
View Source
Render()
Declaration
public abstract void Render()
|
Edit this page
View Source
RunGame()
Declaration
|
Edit this page
View Source
StartBrowserLoop()
Loads content and starts the frame clock. The browser host calls this once,
then Tick() from JavaScript. Desktop RunGame() does
the same work itself so the first-frame clock stays where it was.
Declaration
public void StartBrowserLoop()
|
Edit this page
View Source
Tick()
One frame: delta clamp, update, post, render. False when the loop should stop.
Declaration
Returns
|
Edit this page
View Source
Update(double)
Declaration
public virtual void Update(double deltaTime)
Parameters
| Type |
Name |
Description |
| double |
deltaTime |
|
Implements