abstract class Prism::Engine
- Prism::Engine
- RenderLoop::Engine
- Reference
- Object
Overview
The main engine to run the game. You can implement your game engine by inheriting this class and adding your logic.
Direct Known Subclasses
Defined in:
prism/engine.crInstance Method Summary
-
#add_entity(entity : Crash::Entity)
Adds an entity to the entity engine
-
#add_system(system : Crash::System, priority : Int32)
Adds a system to the entity engine
-
#flush
Flush the GL buffers and resize the viewport to match the window size
- #get_open_gl_version
-
#init
Games should implement this to start their game logic
-
#render
Renders the game
-
#startup
Starts up the engine.
-
#tick(tick : RenderLoop::Tick, input : RenderLoop::Input)
Process inputs This will pass time and input to the engine systems.
Instance Method Detail
def tick(tick : RenderLoop::Tick, input : RenderLoop::Input)
#
Process inputs This will pass time and input to the engine systems.