Documentation
¶
Index ¶
- type Engine
- func (e *Engine) Exit(code int)
- func (e *Engine) GetActiveScene() *core.Scene
- func (e *Engine) GetDeltaTime() uint64
- func (e *Engine) GetKeyboard() *input.Keyboard
- func (e *Engine) GetMouse() *input.Mouse
- func (e *Engine) GetTicks() uint64
- func (e *Engine) Run()
- func (e *Engine) SetActiveScene(scene *core.Scene)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Engine ¶
type Engine struct {
// contains filtered or unexported fields
}
Engine is main structure, which links everything together, and behaves like entry point for your game.
func (*Engine) GetActiveScene ¶
GetActiveScene returns current scene of the Engine
func (*Engine) GetDeltaTime ¶ added in v0.4.0
GetDeltaTime returns difference between two frames in milliseconds.
func (*Engine) GetKeyboard ¶ added in v0.4.0
GetKeyboard returns Engine instance of input.Keyboard, the only initialized instance you should use
func (*Engine) GetMouse ¶
GetMouse returns Engine instance of input.Mouse, the only initialized instance you should use
func (*Engine) GetTicks ¶ added in v0.4.0
GetTicks returns number of milliseconds since SDL was initialized in NewEngine function
func (*Engine) Run ¶
func (e *Engine) Run()
Run creates window and start rendering activeScene.
It is required to call Run in main thread
func (*Engine) SetActiveScene ¶
SetActiveScene sets active scene in the engine, which will be used to render text frame