Komodo Engine
C PROJECT_LOGO=
Komodo.Core.Game Class Reference

Manages all graphics initialization, systems, and underlying interactions with the MonoGame framework. More...

Inheritance diagram for Komodo.Core.Game:

Public Member Functions

 Game ()
 Creates the Game instance, instantiating the underlying Komodo.Core.MonoGame instance, Komodo.Core.Engine.Graphics.GraphicsManager, and Komodo.Core.ECS.Systems.ISystem objects. More...
 
PhysicsSystem CreatePhysicsSystem ()
 Creates and begins tracking a new Komodo.Core.ECS.Systems.PhysicsSystem. More...
 
Render2DSystem CreateRender2DSystem ()
 Creates and begins tracking a new Komodo.Core.ECS.Systems.Render2DSystem. More...
 
Render3DSystem CreateRender3DSystem ()
 Creates and begins tracking a new Komodo.Core.ECS.Systems.Render3DSystem. More...
 
void Draw (GameTime gameTime)
 Draws a frame with a default clear color. More...
 
void Draw (GameTime _, Color clearColor)
 Draws a frame with a provided clear color. More...
 
void Exit ()
 Exits the application. More...
 
void Initialize ()
 Initializes the Komodo.Core.Engine.Graphics.GraphicsManager and all Komodo.Core.ECS.Systems.ISystem objects. More...
 
void Run ()
 
void Update (GameTime gameTime)
 Updates Komodo.Core.ECS.Systems.ISystem objects. More...
 
void Dispose ()
 Implicit call to Dispose(bool). More...
 

Protected Member Functions

virtual void Dispose (bool isDisposing)
 Disposes of the underlying Komodo.Core.MonoGame instance. More...
 

Properties

BehaviorSystem BehaviorSystem [get]
 Manages all Komodo.Core.ECS.Components.BehaviorComponent objects. More...
 
CameraSystem CameraSystem [get]
 Manages all Komodo.Core.ECS.Components.CameraComponent objects. More...
 
BasicEffect DefaultSpriteShader [get, set]
 Default shader for all Komodo.Core.ECS.Components.Drawable2DComponent. More...
 
List< PhysicsSystemPhysicsSystems [get]
 Manages all Komodo.Core.ECS.Components.PhysicsComponent objects. More...
 
List< Render2DSystemRender2DSystems [get]
 Manages all Komodo.Core.ECS.Components.Drawable2DComponent objects. More...
 
List< Render3DSystemRender3DSystems [get]
 Manages all Komodo.Core.ECS.Components.Drawable3DComponent objects. More...
 
SoundSystem SoundSystem [get]
 Manages all Komodo.Core.ECS.Components.SoundComponent objects. More...
 
float FramesPerSecond [get]
 Tracks the FPS based on current Microsoft.Xna.Framework.GameTime. More...
 
GraphicsManager GraphicsManager [get]
 Manages graphics devices for the Game window. More...
 
string??? Title [get, set]
 Window title. More...
 
static ContentManager Content [get]
 Provides access to the content files compiled by the MonoGame Content Pipeline (Releases: https://github.com/MonoGame/MonoGame/releases). More...
 

Detailed Description

Manages all graphics initialization, systems, and underlying interactions with the MonoGame framework.

Constructor & Destructor Documentation

◆ Game()

Komodo.Core.Game.Game ( )

Creates the Game instance, instantiating the underlying Komodo.Core.MonoGame instance, Komodo.Core.Engine.Graphics.GraphicsManager, and Komodo.Core.ECS.Systems.ISystem objects.

Member Function Documentation

◆ CreatePhysicsSystem()

PhysicsSystem Komodo.Core.Game.CreatePhysicsSystem ( )

Creates and begins tracking a new Komodo.Core.ECS.Systems.PhysicsSystem.

◆ CreateRender2DSystem()

Render2DSystem Komodo.Core.Game.CreateRender2DSystem ( )

Creates and begins tracking a new Komodo.Core.ECS.Systems.Render2DSystem.

◆ CreateRender3DSystem()

Render3DSystem Komodo.Core.Game.CreateRender3DSystem ( )

Creates and begins tracking a new Komodo.Core.ECS.Systems.Render3DSystem.

◆ Dispose() [1/2]

void Komodo.Core.Game.Dispose ( )

Implicit call to Dispose(bool).

◆ Dispose() [2/2]

virtual void Komodo.Core.Game.Dispose ( bool  isDisposing)
protectedvirtual

Disposes of the underlying Komodo.Core.MonoGame instance.

Parameters
isDisposingWhether or not the Game is disposing.

◆ Draw() [1/2]

void Komodo.Core.Game.Draw ( GameTime  _,
Color  clearColor 
)

Draws a frame with a provided clear color.

Parameters
_Time passed since last Draw(GameTime).
clearColorMicrosoft.Xna.Framework.Color to clear the screen with.

◆ Draw() [2/2]

void Komodo.Core.Game.Draw ( GameTime  gameTime)

Draws a frame with a default clear color.

Parameters
gameTimeTime passed since last Draw(GameTime).

◆ Exit()

void Komodo.Core.Game.Exit ( )

Exits the application.

◆ Initialize()

void Komodo.Core.Game.Initialize ( )

◆ Update()

void Komodo.Core.Game.Update ( GameTime  gameTime)

Updates Komodo.Core.ECS.Systems.ISystem objects.

Parameters
gameTimeTime passed since last Update(GameTime).

Property Documentation

◆ BehaviorSystem

BehaviorSystem Komodo.Core.Game.BehaviorSystem
get

◆ CameraSystem

CameraSystem Komodo.Core.Game.CameraSystem
get

◆ Content

ContentManager Komodo.Core.Game.Content
staticget

Provides access to the content files compiled by the MonoGame Content Pipeline (Releases: https://github.com/MonoGame/MonoGame/releases).

◆ DefaultSpriteShader

BasicEffect Komodo.Core.Game.DefaultSpriteShader
getset

◆ FramesPerSecond

float Komodo.Core.Game.FramesPerSecond
get

Tracks the FPS based on current Microsoft.Xna.Framework.GameTime.

◆ GraphicsManager

GraphicsManager Komodo.Core.Game.GraphicsManager
get

Manages graphics devices for the Game window.

◆ PhysicsSystems

List<PhysicsSystem> Komodo.Core.Game.PhysicsSystems
get

◆ Render2DSystems

List<Render2DSystem> Komodo.Core.Game.Render2DSystems
get

◆ Render3DSystems

List<Render3DSystem> Komodo.Core.Game.Render3DSystems
get

◆ SoundSystem

SoundSystem Komodo.Core.Game.SoundSystem
get

◆ Title

string??? Komodo.Core.Game.Title
getset

Window title.