goplayengine

package module
v0.5.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 17, 2025 License: MIT Imports: 9 Imported by: 0

README

GoPlayEngine

Documentation

Index

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 NewEngine

func NewEngine() *Engine

func (*Engine) Exit

func (e *Engine) Exit(code int)

Exit tries to gracefully shutdown game engine and exit with provided code.

func (*Engine) GetActiveScene

func (e *Engine) GetActiveScene() *core.Scene

GetActiveScene returns current scene of the Engine

func (*Engine) GetDeltaTime added in v0.4.0

func (e *Engine) GetDeltaTime() uint64

GetDeltaTime returns difference between two frames in milliseconds.

func (*Engine) GetKeyboard added in v0.4.0

func (e *Engine) GetKeyboard() *input.Keyboard

GetKeyboard returns Engine instance of input.Keyboard, the only initialized instance you should use

func (*Engine) GetMouse

func (e *Engine) GetMouse() *input.Mouse

GetMouse returns Engine instance of input.Mouse, the only initialized instance you should use

func (*Engine) GetTicks added in v0.4.0

func (e *Engine) GetTicks() uint64

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

func (e *Engine) SetActiveScene(scene *core.Scene)

SetActiveScene sets active scene in the engine, which will be used to render text frame

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL