Class Game
- Namespace
- Fantas
- Assembly
- Fantas.dll
Main Game
public class Game
- Inheritance
-
Game
- Inherited Members
Constructors
Game()
Constructor
public Game()
Game(Size)
public Game(Size preferredWindowSize)
Parameters
preferredWindowSize
Sizeon Desktop the preferred window size (in points)
Properties
CurrentScene
Current Scene presented
public Scene CurrentScene { get; }
Property Value
GameOptions
Get current game options set on Game object
public GameOptions GameOptions { get; }
Property Value
Instance
Game singleton instance
public static Game Instance { get; }
Property Value
IsFullScreen
Change/Get Window Full Screen mode
public bool IsFullScreen { get; set; }
Property Value
RunOneFrame
Flag to make Run, only render one frame. (only works on MonoGame backend)
protected bool RunOneFrame { get; set; }
Property Value
ScaleMode
Scene Scale Mode, need to be set before creating the scene
public SceneScaleMode ScaleMode { get; set; }
Property Value
WindowSize
Change the Windows Size This will work mostly on Desktop implementation,
public Size WindowSize { get; set; }
Property Value
WindowTitle
Change the Windows Title This will work mostly on Desktop implementation,
public string WindowTitle { get; set; }
Property Value
Methods
Exit()
Terminate the Application (this has no effect on mobile)
public void Exit()
GetSceneSnapshot()
Get a PNG buffer representation of the presented Scene
public byte[] GetSceneSnapshot()
Returns
- byte[]
Return current scene frame as PNG encoded in a byte array
PresentScene(Scene)
Present a scene
public void PresentScene(Scene scene)
Parameters
scene
Scene
Exceptions
Run()
Run the game main loop
public void Run()
WindowSizeChanged()
Called when Window is resized
public virtual void WindowSizeChanged()