burrito

package module
v0.0.0-...-840295e Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2021 License: BSD-3-Clause Imports: 10 Imported by: 0

README ¶

🌯 Burrito Game Engine 🌯

Documentation ¶

Index ¶

Constants ¶

This section is empty.

Variables ¶

View Source
var Canvases map[string]*sdl.Texture

Collections

View Source
var CurrentCanvas string

Graphical variables

View Source
var CurrentColor color
View Source
var Event events
View Source
var Images map[string]*sdl.Texture
View Source
var KeyState []uint8
View Source
var LuaState *lua.State
View Source
var Music map[string]*mix.Music
View Source
var Renderer *sdl.Renderer
View Source
var Running bool
View Source
var ScaleX float32
View Source
var ScaleY float32
View Source
var Sounds map[string]*mix.Chunk
View Source
var State state
View Source
var TranslateX int
View Source
var TranslateY int
View Source
var Window *sdl.Window

Variables

Functions ¶

func AddImage ¶

func AddImage(name, path string) *sdl.Texture

func AddMusic ¶

func AddMusic(name, dir string) *mix.Music

Music

func AddSound ¶

func AddSound(name, dir string) *mix.Chunk

--------Audio---------- Sounds

func ClearCanvas ¶

func ClearCanvas()

func DrawCircle ¶

func DrawCircle(x, y, r float64)

func DrawImage ¶

func DrawImage(name string, x, y float64, rotation float32, sx, sy float32)

func DrawLine ¶

func DrawLine(x1, y1, x2, y2 float64)

func DrawRectangle ¶

func DrawRectangle(x, y, w, h float64)

func EmptyKeyFunc ¶

func EmptyKeyFunc(key string)

func Float32If ¶

func Float32If(statement bool, t, f float32) float32

func GetMouseX ¶

func GetMouseX() int

func GetMouseY ¶

func GetMouseY() int

func GetPathType ¶

func GetPathType(p string) string

func IntIf ¶

func IntIf(statement bool, t, f int) int

func IsKeyDown ¶

func IsKeyDown(key string) bool

func IsMouseDown ¶

func IsMouseDown(button string) bool

func LuaDraw ¶

func LuaDraw()

func LuaKeyPressed ¶

func LuaKeyPressed(key string)

func LuaKeyReleased ¶

func LuaKeyReleased(key string)

func LuaMousePressed ¶

func LuaMousePressed(x, y int, button string, clicks int)

func LuaMouseReleased ¶

func LuaMouseReleased(x, y int, button string, clicks int)

func LuaStart ¶

func LuaStart()

--------Start----------

func LuaUpdate ¶

func LuaUpdate(dt float32)

func MouseButtonString ¶

func MouseButtonString(button uint8) string

func NewCanvas ¶

func NewCanvas(name string, w, h int) *sdl.Texture

func NewState ¶

func NewState(w, h int, name string) state

func Origin ¶

func Origin()

func PlayMusic ¶

func PlayMusic(name string, loops int)

func PlaySound ¶

func PlaySound(name string, repetitions int) int

func SetCanvas ¶

func SetCanvas(c string)

func SetColor ¶

func SetColor(r, g, b, a int)

func Start ¶

func Start(w, h int, name string)

func StringIf ¶

func StringIf(statement bool, t, f string) string

Utils

Types ¶

type DrawFunc ¶

type DrawFunc func() // <--- Nothing needs to be passed, yey!

type DrawOperation ¶

type DrawOperation struct {
	// contains filtered or unexported fields
}

type KeyPressed ¶

type KeyPressed func(string) // <---- Key

type KeyReleased ¶

type KeyReleased func(string) // <---- Key

type MousePressed ¶

type MousePressed func(int, int, string, int) // <---- X, Y, mouse button, clicks (single click, double click etc.)

type MouseReleased ¶

type MouseReleased func(int, int, string, int) // <---- X, Y, mouse button, clicks (single click, double click etc.)

type Object ¶

type Object struct {
	Name        string
	X, Y, Scale float32
	Image       string
}

func AddObject ¶

func AddObject(o Object) *Object

type UpdateFunc ¶

type UpdateFunc func(float32) // <----- dt (Time)

Declaring event function types, setting default functions and putting them in burrito.Event.EventName fashion...

Directories ¶

Path Synopsis

Jump to

Keyboard shortcuts

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