Documentation ¶
Index ¶
- func FileExists(_file string) bool
- func GetPath() string
- func HandleEvents(_event sdl.Event)
- type Engine
- func (engine *Engine) Exit()
- func (engine *Engine) GraphicsClearFunction(env *object.Environment, args ...object.Object) object.Object
- func (engine *Engine) GraphicsDrawFunction(env *object.Environment, args ...object.Object) object.Object
- func (engine *Engine) GraphicsFilledRectangleFunction(env *object.Environment, args ...object.Object) object.Object
- func (engine *Engine) GraphicsLineFunction(env *object.Environment, args ...object.Object) object.Object
- func (engine *Engine) GraphicsPixelFunction(env *object.Environment, args ...object.Object) object.Object
- func (engine *Engine) GraphicsPrintFunction(env *object.Environment, args ...object.Object) object.Object
- func (engine *Engine) GraphicsRectangleFunction(env *object.Environment, args ...object.Object) object.Object
- func (engine *Engine) GraphicsSetColorFunction(env *object.Environment, args ...object.Object) object.Object
- func (engine *Engine) KeyboardIsDownFunction(env *object.Environment, args ...object.Object) object.Object
- func (engine *Engine) MouseHideCursorFunction(env *object.Environment, args ...object.Object) object.Object
- func (engine *Engine) MouseShowCursorFunction(env *object.Environment, args ...object.Object) object.Object
- func (engine *Engine) Run(env *object.Environment)
- func (engine *Engine) SetDrawFunction(_draw func(env *object.Environment))
- func (engine *Engine) SetFPS(_fps uint32)
- func (engine *Engine) SetLoadFunction(_load func(env *object.Environment))
- func (engine *Engine) SetTitle(_title string)
- func (engine *Engine) SetUpdateFunction(_update func(env *object.Environment))
- func (engine *Engine) SetWindow(_width int32, _height int32)
- func (engine *Engine) WindowBorderedFunction(env *object.Environment, args ...object.Object) object.Object
- func (engine *Engine) WindowBorderlessFunction(env *object.Environment, args ...object.Object) object.Object
- func (engine *Engine) WindowFullscreenFunction(env *object.Environment, args ...object.Object) object.Object
- func (engine *Engine) WindowHeightFunction(env *object.Environment, args ...object.Object) object.Object
- func (engine *Engine) WindowSetSizeFunction(env *object.Environment, args ...object.Object) object.Object
- func (engine *Engine) WindowTitleFunction(env *object.Environment, args ...object.Object) object.Object
- func (engine *Engine) WindowWidthFunction(env *object.Environment, args ...object.Object) object.Object
- type Image
- type Resource
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FileExists ¶
func HandleEvents ¶
HandleEvents loops through and handles events polled from SDL.
Types ¶
type Engine ¶
type Engine struct { KeyState []uint8 // contains filtered or unexported fields }
Engine holds the bindings for SDL and all callback functions to be called during the main game loop.
func (*Engine) Exit ¶
func (engine *Engine) Exit()
Exit frees all resources used by Engine for a clean exit.
func (*Engine) GraphicsClearFunction ¶
func (engine *Engine) GraphicsClearFunction(env *object.Environment, args ...object.Object) object.Object
GraphicsClearFunction registers the Graphics.clear function with Ghost.
func (*Engine) GraphicsDrawFunction ¶
func (engine *Engine) GraphicsDrawFunction(env *object.Environment, args ...object.Object) object.Object
GraphicsDrawFunction registers the Graphics.draw function with Ghost.
func (*Engine) GraphicsFilledRectangleFunction ¶
func (engine *Engine) GraphicsFilledRectangleFunction(env *object.Environment, args ...object.Object) object.Object
GraphicsFilledRectangleFunction registers the Graphics.filledRectangle function with Ghost.
func (*Engine) GraphicsLineFunction ¶
func (engine *Engine) GraphicsLineFunction(env *object.Environment, args ...object.Object) object.Object
GraphicsLineFunction registers the Graphics.line function with Ghost.
func (*Engine) GraphicsPixelFunction ¶
func (engine *Engine) GraphicsPixelFunction(env *object.Environment, args ...object.Object) object.Object
GraphicsPixelFunction registers the Graphics.pixel function with Ghost.
func (*Engine) GraphicsPrintFunction ¶
func (engine *Engine) GraphicsPrintFunction(env *object.Environment, args ...object.Object) object.Object
GraphicsPrintFunction registers the Graphics.print function with Ghost.
func (*Engine) GraphicsRectangleFunction ¶
func (engine *Engine) GraphicsRectangleFunction(env *object.Environment, args ...object.Object) object.Object
GraphicsRectangleFunction registers the Graphics.rectangle function with Ghost.
func (*Engine) GraphicsSetColorFunction ¶
func (*Engine) KeyboardIsDownFunction ¶
func (engine *Engine) KeyboardIsDownFunction(env *object.Environment, args ...object.Object) object.Object
KeyboardIsDownFunction registers the Keyboard.isDown function with Ghost.
func (*Engine) MouseHideCursorFunction ¶
func (engine *Engine) MouseHideCursorFunction(env *object.Environment, args ...object.Object) object.Object
MouseHideCursorFunction registers the Mouse.hideCursor function with Ghost.
func (*Engine) MouseShowCursorFunction ¶
func (engine *Engine) MouseShowCursorFunction(env *object.Environment, args ...object.Object) object.Object
MouseShowCursorFunction registers the Mouse.showCursor function with Ghost.
func (*Engine) SetDrawFunction ¶
func (engine *Engine) SetDrawFunction(_draw func(env *object.Environment))
SetDrawFunction defines the draw function to be used by Engine.
func (*Engine) SetLoadFunction ¶
func (engine *Engine) SetLoadFunction(_load func(env *object.Environment))
SetLoadFunction defines the load function to be used by Engine.
func (*Engine) SetUpdateFunction ¶
func (engine *Engine) SetUpdateFunction(_update func(env *object.Environment))
SetUpdateFunction defines the update function to be used by Engine.
func (*Engine) WindowBorderedFunction ¶
func (engine *Engine) WindowBorderedFunction(env *object.Environment, args ...object.Object) object.Object
WindowBorderedFunction registers the Window.bordered function with Ghost.
func (*Engine) WindowBorderlessFunction ¶
func (engine *Engine) WindowBorderlessFunction(env *object.Environment, args ...object.Object) object.Object
WindowBorderlessFunction registers the Window.borderless function with Ghost.
func (*Engine) WindowFullscreenFunction ¶
func (engine *Engine) WindowFullscreenFunction(env *object.Environment, args ...object.Object) object.Object
WindowFullscreenFunction registers the Window.fullscreen function with Ghost.
func (*Engine) WindowHeightFunction ¶
func (engine *Engine) WindowHeightFunction(env *object.Environment, args ...object.Object) object.Object
WindowHeightFunction registers the Window.height function with Ghost.
func (*Engine) WindowSetSizeFunction ¶
func (engine *Engine) WindowSetSizeFunction(env *object.Environment, args ...object.Object) object.Object
WindowSetSizeFunction registers the Window.setSize function with Ghost.
func (*Engine) WindowTitleFunction ¶
func (engine *Engine) WindowTitleFunction(env *object.Environment, args ...object.Object) object.Object
WindowTitleFunction registers the Window.title function with Ghost.
func (*Engine) WindowWidthFunction ¶
func (engine *Engine) WindowWidthFunction(env *object.Environment, args ...object.Object) object.Object
WindowWidthFunction registers the Window.width function with Ghost.