ego

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2019 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NAME       = "eGo Game Engine 2D"
	MAJORVER   = 0
	MINORVER   = 2
	RELEASEVER = 0
)

Variables

View Source
var (
	AssetsLoaded bool

	Textures map[string]texture

	Music map[string]*mix.Music

	Sounds map[string]*mix.Chunk
)
View Source
var (
	Log *logit.Logger

	Width, Height int32
	FullScreen    bool
	Name          string

	Renderer *sdl.Renderer

	DeltaTime float32
	FPS       int32
)
View Source
var (
	ActiveScene scene
)
View Source
var (
	Audio audio
)

Functions

func AddScene

func AddScene(name string, s scene)

func ChangeScene

func ChangeScene(name string) bool

func Create

func Create(w, h int32, wm WinMode, n string)

func GetScene

func GetScene(name string) (scene, bool)

func LoadAssets

func LoadAssets()

func LoadMusic

func LoadMusic(name, path string) error

Music

func LoadSound

func LoadSound(name, path string) error

/Sounds

func LoadTexture

func LoadTexture(name, path string) error

Textures

func NewPool

func NewPool(c int, create func() object) *objectPool

func NextScene

func NextScene()

func Quit

func Quit()

func RegisterExtra

func RegisterExtra(e extras)

func Run

func Run() error

func SetInitScene

func SetInitScene(name string) bool

func SetNextScene

func SetNextScene(name string) bool

func SetWindowMode

func SetWindowMode(m WinMode) error

func SetWindowSize

func SetWindowSize(w, h int32)

func Version

func Version() string

Types

type Color

type Color struct {
	R uint8
	G uint8
	B uint8
	A uint8
}

func NewColor

func NewColor(r, g, b, a uint8) Color

type ExtraObject

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

type Object

type Object struct {
	math.Transform
	// contains filtered or unexported fields
}

func NewObject

func NewObject() *Object

func (*Object) Reset

func (o *Object) Reset()

type Scene

type Scene struct {
	Background Color
	// contains filtered or unexported fields
}

func (*Scene) Add

func (l *Scene) Add(i int, obj object) error

func (*Scene) Init

func (s *Scene) Init(n int)

type WinMode

type WinMode int32
const (
	FULLSCREEN WinMode = iota
	WINDOWED
	BORDERLESS_FULLSCREEN
)
var (
	WindowMode WinMode
)

func (WinMode) String

func (w WinMode) String() string

Jump to

Keyboard shortcuts

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