engi

package module
v0.0.0-...-7350d45 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2015 License: BSD-2-Clause Imports: 28 Imported by: 0

README

#Engi A cross-platform game engine written in Go following an interpretation of the Entity Component System paradigm. Engi is currently compilable for Mac OSX, Linux, Windows and the Web. With the release of Go 1.4, sporting Android and the inception of IOS compatibility, mobile will soon be added as a release target.

Currently documentation is pretty scarce, this is because I have not completely finalized the API and am about to go through a "pretification" process in order to increase elegance and usability. For a basic up to date example of most features, look to the demos/hello.go and demos/pong/pong.go files. These files are currently your best friends for learning engi, well and me (feel free to shoot me a DM or issue whenever you want!).

Examples

If you want to see some projects using engi, check out the demos folder. Newbrict/OakTale is probably the best place to see the newer features (tilemaps, z-layers, physics)

Getting in touch / Contributing

Currently we are active on the gopher slack (You can request an invite here: http://bit.ly/go-slack-signup) under the #engi channel.

The roadmap is available on trello here. If you wish to have something added, or want to discuss a new feature you should begin talking about it in either an issue or on the previously mentioned slack channel.

Docs

Before you read the basic doc, here are a few notes for me (and other contributors) about ideas to achieve elegance

  • A potential engi.Files.Add(engi.NewResource("world", "world.txt"), engi.NewResource("face", "data/face.png")) --DONE
  • Initialize batch in a cleaner manner in custom worlds --DONE
  • Neater systems adding
  • Clean entity construction from an external file
  • Add or re look at New__Component__() functions for SpaceComponent, RenderComponent, and others
  • Automatically detect which systems should be added to based off component depends on
  • Revisit the camera API and its locating in World{}
  • Presets (prefabs?) for the easy re-initialization of an entity pattern

##Installation go get -u github.com/paked/engi

TODO Write about the needed dependencies ##Getting Started

package main
   
import (
	"github.com/paked/engi"
)

type Game struct {
	engi.World
}

func (game *Game) Setup() {
	engi.SetBg(0xffffff)
	game.AddSystem(&engi.RenderSystem{})
}

func main() {
	engi.Open("Title", 800, 800, false, &Game{})
}

First we start off by declaring that it is a runnable file, then import the engi library. Inside the main() function we finish off by opening the window, the four parameters that are passed in are Window Title, Window Width, Window Height, Fullscreen Mode (as a bool) and finally an instance of Game.

If you were to run this code, a white 800x800 window would appear on your screen.

TODO Write about entities

TODO Write about components

TODO Write about systems

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Time  *Clock
	Files *Loader

	Mailbox     MessageManager
	Gl          = gl
	Cam         *Camera
	Wo          Responder
	WorldBounds AABB
)
View Source
var (
	Arrow     *glfw.Cursor
	IBeam     *glfw.Cursor
	Crosshair *glfw.Cursor
	Hand      *glfw.Cursor
	HResize   *glfw.Cursor
	VResize   *glfw.Cursor
)
View Source
var (
	MOVE    = Action(0)
	PRESS   = Action(1)
	RELEASE = Action(2)
	SHIFT   = Modifier(0x0001)
	CONTROL = Modifier(0x0002)
	ALT     = Modifier(0x0004)
	SUPER   = Modifier(0x0008)
)
View Source
var (
	Dash         = Key(189)
	Apostrophe   = Key(222)
	Semicolon    = Key(186)
	Equals       = Key(187)
	Comma        = Key(188)
	Period       = Key(190)
	Slash        = Key(191)
	Backslash    = Key(220)
	Backspace    = Key(8)
	Tab          = Key(9)
	CapsLock     = Key(20)
	Space        = Key(32)
	Enter        = Key(13)
	Escape       = Key(27)
	Insert       = Key(45)
	PrintScreen  = Key(42)
	Delete       = Key(46)
	PageUp       = Key(33)
	PageDown     = Key(34)
	Home         = Key(36)
	End          = Key(35)
	Pause        = Key(19)
	ScrollLock   = Key(145)
	ArrowLeft    = Key(37)
	ArrowRight   = Key(39)
	ArrowDown    = Key(40)
	ArrowUp      = Key(38)
	LeftBracket  = Key(219)
	LeftShift    = Key(16)
	LeftControl  = Key(17)
	LeftSuper    = Key(73)
	LeftAlt      = Key(18)
	RightBracket = Key(221)
	RightShift   = Key(16)
	RightControl = Key(17)
	RightSuper   = Key(73)
	RightAlt     = Key(18)
	Zero         = Key(48)
	One          = Key(49)
	Two          = Key(50)
	Three        = Key(51)
	Four         = Key(52)
	Five         = Key(53)
	Six          = Key(54)
	Seven        = Key(55)
	Eight        = Key(56)
	Nine         = Key(57)
	F1           = Key(112)
	F2           = Key(113)
	F3           = Key(114)
	F4           = Key(115)
	F5           = Key(116)
	F6           = Key(117)
	F7           = Key(118)
	F8           = Key(119)
	F9           = Key(120)
	F10          = Key(121)
	F11          = Key(122)
	F12          = Key(123)
	A            = Key(65)
	B            = Key(66)
	C            = Key(67)
	D            = Key(68)
	E            = Key(69)
	F            = Key(70)
	G            = Key(71)
	H            = Key(72)
	I            = Key(73)
	J            = Key(74)
	K            = Key(75)
	L            = Key(76)
	M            = Key(77)
	N            = Key(78)
	O            = Key(79)
	P            = Key(80)
	Q            = Key(81)
	R            = Key(82)
	S            = Key(83)
	T            = Key(84)
	U            = Key(85)
	V            = Key(86)
	W            = Key(87)
	X            = Key(88)
	Y            = Key(89)
	Z            = Key(90)
	NumLock      = Key(144)
	NumMultiply  = Key(106)
	NumDivide    = Key(111)
	NumAdd       = Key(107)
	NumSubtract  = Key(109)
	NumZero      = Key(96)
	NumOne       = Key(97)
	NumTwo       = Key(98)
	NumThree     = Key(99)
	NumFour      = Key(100)
	NumFive      = Key(101)
	NumSix       = Key(102)
	NumSeven     = Key(103)
	NumEight     = Key(104)
	NumNine      = Key(105)
	NumDecimal   = Key(110)
	NumEnter     = Key(13)
)
View Source
var (
	KEY_STATE_UP        string = "up"
	KEY_STATE_DOWN      string = "down"
	KEY_STATE_JUST_DOWN string = "justdown"
	KEY_STATE_JUST_UP   string = "justup"

	Keys KeyManager
)

Functions

func Clamp

func Clamp(a, b, c float32) float32

Returns x where b<=x<=c | x is a clamped between b and c

func Exit

func Exit()

func Height

func Height() float32

func IsIntersecting

func IsIntersecting(rect1 AABB, rect2 AABB) bool

func LoadShader

func LoadShader(vertSrc, fragSrc string) *webgl.Program

func Open

func Open(title string, width, height int, fullscreen bool, r Responder)

func SetBg

func SetBg(color uint32)

func SetCamera

func SetCamera(c *Camera)

func SetFPSLimit

func SetFPSLimit(limit int) error

func Width

func Width() float32

Types

type AABB

type AABB struct {
	Min, Max Point
}

type Action

type Action int

type AnimationComponent

type AnimationComponent struct {
	Index int // What frame in the is being used

	Rate float32 // How often frames should increment, in seconds.

	S                *Spritesheet     // Pointer to the source spritesheet
	Animations       map[string][]int // All possible animations
	CurrentAnimation []int            // The currently animation
	// contains filtered or unexported fields
}

Component that controls animation in rendering entities

func NewAnimationComponent

func NewAnimationComponent() *AnimationComponent

Create a new pointer to AnimationComponent

func (*AnimationComponent) AddAnimation

func (ac *AnimationComponent) AddAnimation(name string, indexes []int)

func (*AnimationComponent) Cell

func (ac *AnimationComponent) Cell() *Region

Bug(me) Don't need to use _index at all, use ac.CurrentAnimation[ac.Index] instead. Set ac.Index as a private member variable

func (*AnimationComponent) Increment

func (ac *AnimationComponent) Increment()

Increment the frame

func (AnimationComponent) Name

func (ac AnimationComponent) Name() string

func (*AnimationComponent) SelectAnimation

func (ac *AnimationComponent) SelectAnimation(name string)

type AnimationSystem

type AnimationSystem struct {
	*System
}

func (AnimationSystem) Name

func (a AnimationSystem) Name() string

func (*AnimationSystem) New

func (a *AnimationSystem) New()

func (*AnimationSystem) Update

func (a *AnimationSystem) Update(e *Entity, dt float32)

type Assets

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

func NewAssets

func NewAssets() *Assets

func (*Assets) Get

func (a *Assets) Get(path string) Image

func (*Assets) Image

func (a *Assets) Image(path string)

func (*Assets) Load

func (a *Assets) Load(onFinish func())

type Batch

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

func NewBatch

func NewBatch(width, height float32) *Batch

func (*Batch) Begin

func (b *Batch) Begin()

func (*Batch) Draw

func (b *Batch) Draw(r Drawable, x, y, originX, originY, scaleX, scaleY, rotation float32, color uint32, transparency float32)

func (*Batch) End

func (b *Batch) End()

func (*Batch) SetProjection

func (b *Batch) SetProjection(width, height float32)

type ByFirstgid

type ByFirstgid []TMXTileset

func (ByFirstgid) Len

func (t ByFirstgid) Len() int

func (ByFirstgid) Less

func (t ByFirstgid) Less(i, j int) bool

func (ByFirstgid) Swap

func (t ByFirstgid) Swap(i, j int)

type Camera

type Camera struct {
	DeadzoneSize Point
	// contains filtered or unexported fields
}

A rather basic camera

func (*Camera) FollowEntity

func (cam *Camera) FollowEntity(entity *Entity)

func (*Camera) Update

func (cam *Camera) Update(dt float32)

type Clock

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

func NewClock

func NewClock() *Clock

func (*Clock) Delta

func (c *Clock) Delta() float32

func (*Clock) Fps

func (c *Clock) Fps() float32

func (*Clock) Tick

func (c *Clock) Tick()

func (*Clock) Time

func (c *Clock) Time() float32

type CollisionComponent

type CollisionComponent struct {
	Solid, Main bool
	Extra       Point
}

func (CollisionComponent) Name

func (cc CollisionComponent) Name() string

type CollisionMasterComponent

type CollisionMasterComponent struct {
}

func (CollisionMasterComponent) Is

func (CollisionMasterComponent) Name

func (cm CollisionMasterComponent) Name() string

type CollisionMessage

type CollisionMessage struct {
	Entity *Entity
	To     *Entity
}

func (CollisionMessage) Type

func (collision CollisionMessage) Type() string

type CollisionSystem

type CollisionSystem struct {
	*System
}

func (CollisionSystem) Name

func (cs CollisionSystem) Name() string

func (*CollisionSystem) New

func (cs *CollisionSystem) New()

func (*CollisionSystem) Update

func (cs *CollisionSystem) Update(entity *Entity, dt float32)

type Color

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

type Component

type Component interface {
	Name() string
}

type Drawable

type Drawable interface {
	Texture() *webgl.Texture
	Width() float32
	Height() float32
	View() (float32, float32, float32, float32)
}

type Entity

type Entity struct {
	Exists  bool
	Pattern string
	// contains filtered or unexported fields
}

func NewEntity

func NewEntity(requires []string) *Entity

func (*Entity) AddComponent

func (e *Entity) AddComponent(component Component)

func (*Entity) DoesRequire

func (e *Entity) DoesRequire(name string) bool

func (*Entity) GetComponent

func (e *Entity) GetComponent(x interface{}) bool

GetComponent takes a double pointer to a Component, and populates it with the value of the right type.

func (*Entity) ID

func (e *Entity) ID() string

type Font

type Font struct {
	URL  string
	Size float64
	BG   Color
	FG   Color
	// contains filtered or unexported fields
}

TODO FG and BG color config

func (*Font) Create

func (f *Font) Create()

func (*Font) Render

func (f *Font) Render(text string) *Texture

func (*Font) TextDimensions

func (f *Font) TextDimensions(text string) (int, int, int)

type Game

type Game struct{}

func (*Game) Close

func (g *Game) Close()

func (*Game) Key

func (g *Game) Key(key Key, modifier Modifier, action Action)

func (*Game) Mouse

func (g *Game) Mouse(x, y float32, action Action)

func (*Game) Preload

func (g *Game) Preload()

func (*Game) Render

func (g *Game) Render()

func (*Game) Resize

func (g *Game) Resize(w, h int)

func (*Game) Scroll

func (g *Game) Scroll(amount float32)

func (*Game) Setup

func (g *Game) Setup()

func (*Game) Type

func (g *Game) Type(char rune)

func (*Game) Update

func (g *Game) Update(dt float32)

type Handler

type Handler func(i interface{})

type Image

type Image interface {
	Data() interface{}
	Width() int
	Height() int
}

func LoadImage

func LoadImage(data interface{}) Image

type ImageObject

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

func NewImageObject

func NewImageObject(img *image.NRGBA) *ImageObject

func (*ImageObject) Data

func (i *ImageObject) Data() interface{}

func (*ImageObject) Height

func (i *ImageObject) Height() int

func (*ImageObject) Width

func (i *ImageObject) Width() int

type Key

type Key int

type KeyManager

type KeyManager struct {
	KEY_W       KeyState
	KEY_A       KeyState
	KEY_S       KeyState
	KEY_D       KeyState
	KEY_UP      KeyState
	KEY_DOWN    KeyState
	KEY_LEFT    KeyState
	KEY_RIGHT   KeyState
	KEY_SPACE   KeyState
	KEY_CONTROL KeyState
	KEY_ESCAPE  KeyState
	SHIFT       KeyState
}

type KeyState

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

func (KeyState) Down

func (key KeyState) Down() bool

func (KeyState) JustPressed

func (key KeyState) JustPressed() bool

func (KeyState) JustReleased

func (key KeyState) JustReleased() bool

func (*KeyState) State

func (key *KeyState) State() string

func (KeyState) Up

func (key KeyState) Up() bool

type Level

type Level struct {
	Width      int
	Height     int
	TileWidth  int
	TileHeight int
	Tiles      []*tile
	LineBounds []Line
	Images     []*tile
}

func (*Level) Render

func (lvl *Level) Render(b *Batch, render *RenderComponent, space *SpaceComponent)

type Line

type Line struct {
	P1 Point
	P2 Point
}

func (*Line) Angle

func (l *Line) Angle() float32

Returns the line's angle relative to Y = 0

func (*Line) LineIntersection

func (l *Line) LineIntersection(l2 Line) Point

Returns the point where the two lines intersect

func (*Line) PointDistance

func (l *Line) PointDistance(point Point) float32

Returns the squared euclidean distance from a point to a line *segment*

func (*Line) PointDistanceSquared

func (l *Line) PointDistanceSquared(point Point) float32

Returns the squared euclidean distance from a point to a line *segment*

func (*Line) PointSide

func (l *Line) PointSide(point Point) bool

Returns which side of the line the point is on This is useful if you have a point of reference

type LinkComponent

type LinkComponent struct {
	Entity *Entity
}

func (LinkComponent) Name

func (lc LinkComponent) Name() string

type Loader

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

func NewLoader

func NewLoader() *Loader

func (*Loader) Add

func (l *Loader) Add(urls ...string)

func (*Loader) AddFromDir

func (l *Loader) AddFromDir(url string, recurse bool)

func (*Loader) Image

func (l *Loader) Image(name string) *Texture

func (*Loader) Json

func (l *Loader) Json(name string) string

func (*Loader) Level

func (l *Loader) Level(name string) *Level

func (*Loader) Load

func (l *Loader) Load(onFinish func())

type Message

type Message interface {
	Type() string
}

type MessageManager

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

func (*MessageManager) Dispatch

func (mm *MessageManager) Dispatch(name string, message interface{})

func (*MessageManager) Listen

func (mm *MessageManager) Listen(messageType string, handler Handler)

type Modifier

type Modifier int

type Point

type Point struct {
	X, Y float32
}

func MinimumTranslation

func MinimumTranslation(rect1 AABB, rect2 AABB) Point

func (*Point) Add

func (p *Point) Add(p2 Point)

func (*Point) AddScalar

func (p *Point) AddScalar(s float32)

func (*Point) Multiply

func (p *Point) Multiply(p2 Point)

func (*Point) MultiplyScalar

func (p *Point) MultiplyScalar(s float32)

func (*Point) Normalize

func (a *Point) Normalize() (Point, float32)

Returns the unit vector from a, and it's magnitude

func (*Point) PointDistance

func (p *Point) PointDistance(p2 Point) float32

func (*Point) PointDistanceSquared

func (p *Point) PointDistanceSquared(p2 Point) float32

func (*Point) ProjectOnto

func (a *Point) ProjectOnto(b Point) Point

Returns the vector produced by projecting a on to b

func (*Point) Set

func (p *Point) Set(x, y float32)

func (*Point) SetTo

func (p *Point) SetTo(v float32)

func (*Point) Subtract

func (p *Point) Subtract(p2 Point)

func (*Point) SubtractScalar

func (p *Point) SubtractScalar(s float32)

type PriorityLevel

type PriorityLevel int
const (
	HUDGround    PriorityLevel = 4
	Foreground   PriorityLevel = 3
	MiddleGround PriorityLevel = 2
	ScenicGround PriorityLevel = 1
	Background   PriorityLevel = 0
)

type Region

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

func NewRegion

func NewRegion(texture *Texture, x, y, w, h int) *Region

func (*Region) Height

func (r *Region) Height() float32

func (*Region) Render

func (r *Region) Render(b *Batch, render *RenderComponent, space *SpaceComponent)

func (*Region) Texture

func (r *Region) Texture() *webgl.Texture

func (*Region) View

func (r *Region) View() (float32, float32, float32, float32)

func (*Region) Width

func (r *Region) Width() float32

type RenderComponent

type RenderComponent struct {
	Display      Renderable
	Scale        Point
	Label        string
	Priority     PriorityLevel
	Transparency float32
	Color        uint32
}

func NewRenderComponent

func NewRenderComponent(display Renderable, scale Point, label string) RenderComponent

func (RenderComponent) Name

func (rc RenderComponent) Name() string

type RenderSystem

type RenderSystem struct {
	*System
	// contains filtered or unexported fields
}

func (*RenderSystem) AddEntity

func (rs *RenderSystem) AddEntity(e *Entity)

func (RenderSystem) Name

func (rs RenderSystem) Name() string

func (*RenderSystem) New

func (rs *RenderSystem) New()

func (*RenderSystem) Post

func (rs *RenderSystem) Post()

func (RenderSystem) Pre

func (rs RenderSystem) Pre()

func (RenderSystem) Priority

func (rs RenderSystem) Priority() int

func (*RenderSystem) Update

func (rs *RenderSystem) Update(entity *Entity, dt float32)

type Renderable

type Renderable interface {
	Render(b *Batch, render *RenderComponent, space *SpaceComponent)
}

type Resource

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

func NewResource

func NewResource(url string) Resource

type Responder

type Responder interface {
	Render()
	Resize(width, height int)
	Preload()
	Setup()
	Close()
	Update(dt float32)
	Mouse(x, y float32, action Action)
	Scroll(amount float32)
	Key(key Key, modifier Modifier, action Action)
	Type(char rune)
	AddEntity(e *Entity)
	Batch() *Batch
	New()
}

type SpaceComponent

type SpaceComponent struct {
	Position Point
	Width    float32
	Height   float32
}

func (SpaceComponent) AABB

func (sc SpaceComponent) AABB() AABB

func (SpaceComponent) Name

func (sc SpaceComponent) Name() string

type Sprite

type Sprite struct {
	Position *Point
	Scale    *Point
	Anchor   *Point
	Rotation float32
	Color    uint32
	Alpha    float32
	Region   *Region
}

func NewSprite

func NewSprite(region *Region, x, y float32) *Sprite

func (*Sprite) Render

func (s *Sprite) Render(batch *Batch)

type Spritesheet

type Spritesheet struct {
	CellWidth, CellHeight int // The dimensions of the cells
	// contains filtered or unexported fields
}

Spritesheet is a class that stores a set of tiles from a file, used by tilemaps and animations

func NewSpritesheet

func NewSpritesheet(textureName string, cellWidth, cellHeight int) *Spritesheet

Simple handler for creating a new spritesheet from a file textureName is the name of a texture already preloaded with engi.Files.Add

func (*Spritesheet) Cell

func (s *Spritesheet) Cell(i int) *Region

Get the region at the index i, updates and pulls from cache if need be

func (Spritesheet) Height

func (s Spritesheet) Height() float32

The amount of tiles on the y-axis of the spritesheet

func (Spritesheet) Width

func (s Spritesheet) Width() float32

The amount of tiles on the x-axis of the spritesheet

type System

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

func (*System) AddEntity

func (s *System) AddEntity(entity *Entity)

func (System) Entities

func (s System) Entities() []*Entity

func (System) New

func (s System) New()

func (System) Post

func (s System) Post()

func (System) Pre

func (s System) Pre()

func (System) Priority

func (s System) Priority() int

type Systemer

type Systemer interface {
	Update(entity *Entity, dt float32)
	Name() string
	Priority() int
	Pre()
	Post()
	New()
	Entities() []*Entity
	AddEntity(entity *Entity)
}

type TMXImgLayer

type TMXImgLayer struct {
	Name   string    `xml:"name,attr"`
	X      float64   `xml:"x,attr"`
	Y      float64   `xml:"y,attr"`
	ImgSrc TMXImgSrc `xml:"image"`
}

type TMXImgSrc

type TMXImgSrc struct {
	Source string `xml:"source,attr"`
}

type TMXLayer

type TMXLayer struct {
	Name        string `xml:"name,attr"`
	Width       int    `xml:"width,attr"`
	Height      int    `xml:"height,attr"`
	TileMapping []uint32
	// This variable doesn't need to persist, used to fill TileMapping
	CompData []byte `xml:"data"`
}

type TMXLevel

type TMXLevel struct {
	Width      int           `xml:"width,attr"`
	Height     int           `xml:"height,attr"`
	TileWidth  int           `xml:"tilewidth,attr"`
	TileHeight int           `xml:"tileheight,attr"`
	Tilesets   []TMXTileset  `xml:"tileset"`
	Layers     []TMXLayer    `xml:"layer"`
	ObjGroups  []TMXObjGroup `xml:"objectgroup"`
	ImgLayers  []TMXImgLayer `xml:"imagelayer"`
}

type TMXObj

type TMXObj struct {
	X         float64       `xml:"x,attr"`
	Y         float64       `xml:"y,attr"`
	Polylines []TMXPolyline `xml:"polyline"`
}

type TMXObjGroup

type TMXObjGroup struct {
	Name    string   `xml:"name,attr"`
	Objects []TMXObj `xml:"object"`
}

type TMXPolyline

type TMXPolyline struct {
	Points string `xml:"points,attr"`
}

type TMXTileset

type TMXTileset struct {
	Firstgid   int           `xml:"firstgid,attr"`
	Name       string        `xml:"name,attr"`
	TileWidth  int           `xml:"tilewidth,attr"`
	TileHeight int           `xml:"tileheight,attr"`
	ImageSrc   TMXTilesetSrc `xml:"image"`
	Image      *Texture
}

type TMXTilesetSrc

type TMXTilesetSrc struct {
	Source string `xml:"source,attr"`
	Width  int    `xml:"width,attr"`
	Height int    `xml:"height,attr"`
}

Just used to create levelTileset->Image

type Texture

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

func NewTexture

func NewTexture(img Image) *Texture

func (*Texture) Height

func (t *Texture) Height() float32

Height returns the height of the texture.

func (*Texture) Render

func (t *Texture) Render(b *Batch, render *RenderComponent, space *SpaceComponent)

func (*Texture) Texture

func (t *Texture) Texture() *webgl.Texture

func (*Texture) View

func (r *Texture) View() (float32, float32, float32, float32)

func (*Texture) Width

func (t *Texture) Width() float32

Width returns the width of the texture.

type World

type World struct {
	Game
	// contains filtered or unexported fields
}

func (*World) AddEntity

func (w *World) AddEntity(entity *Entity)

func (*World) AddSystem

func (w *World) AddSystem(system Systemer)

func (*World) Batch

func (w *World) Batch() *Batch

func (*World) Entities

func (w *World) Entities() []*Entity

func (*World) New

func (w *World) New()

func (*World) Post

func (w *World) Post()

func (*World) Pre

func (w *World) Pre()

func (*World) Systems

func (w *World) Systems() []Systemer

func (*World) Update

func (w *World) Update(dt float32)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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