Documentation
¶
Overview ¶
Package munfall debug.go Defines our logging.
Package munfall Defines methods used to run the engine.
Package munfall interfaces.go Defines interfaces used to prevent circle imports.
Package munfall Defines primitives that will be used all around the engine, they are here to prevent circle imports.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var Logger = logging.MustGetLogger("graphics")
Logger used to log information.
var Mainfunc = make(chan func())
Mainfunc channel used internally to run the main thread on.
Functions ¶
func CheckGLError ¶
func CheckGLError()
CheckGLError used to check and log any errors that happen in opengl calls.
Types ¶
type Actor ¶
type Actor interface {
ActorID() uint
Kill()
IsDead() bool
IsInWorld() bool
Pos() *WPos
SetPos(pos *WPos)
World() World
}
Actor defines the interface for the actor struct.
type Path ¶
type Path interface {
Cell() Cell
MPos() *MPos
WPos(percent float32) *WPos
IsEnd() bool
Next() Path
First() Path
Last() Path
}
Path is an iterator that defines a path through the world map.
type Renderable ¶
Renderable interface used to pass data to a renderer.
type Space ¶
type Space interface {
Trait() Trait
Initialize(Trait)
Offset() *WPos
Intersects(Space, *WPos) bool
}
Space defines a space that can be used to
type WPos ¶
type WPos struct {
X, Y, Z float32
}
WPos world position.
type World ¶
type World interface {
AddFrameEndTask(f func())
Tick(deltaUnit float32)
GetTrait(a Actor, i interface{}) Trait
GetTraitsImplementing(a Actor, i interface{}) []Trait
GetAllTraitsImplementing(i interface{}) []Trait
AddToWorld(a Actor)
RemoveFromWorld(a Actor)
IssueGlobalOrder(order *Order)
IssueOrder(a Actor, order *Order)
WorldMap() WorldMap
}
World defines the interface for the world struct.
type WorldMap ¶
type WorldMap interface {
Initialize(World)
Width() float32
Height() float32
InsideMapWPos(pos *WPos) bool
InsideMapMPos(pos *MPos) bool
CellAt(*MPos) Cell
GetPath(a Actor, p1, p2 *WPos) Path
ConvertToWPos(*MPos) *WPos
ConvertToMPos(*WPos) *MPos
Register(Actor)
Move(Actor, Path, float32)
Deregister(Actor)
}
WorldMap is the interface for the world map.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package game game.go Defines the struct used to connect all the engine components together.
|
Package game game.go Defines the struct used to connect all the engine components together. |
|
Package graphics Defines a Window type used to create and control a glfw window with an opengl context.
|
Package graphics Defines a Window type used to create and control a glfw window with an opengl context. |
|
render
Package render camera.go Defines a camera type used to control the opengl viewport.
|
Package render camera.go Defines a camera type used to control the opengl viewport. |
|
shader
Package shader shaderprogram.go Defines a shader type that will be used by opengl.
|
Package shader shaderprogram.go Defines a shader type that will be used by opengl. |
|
Package gridworldmap worldmap.go Defines the map that actors live and move on.
|
Package gridworldmap worldmap.go Defines the map that actors live and move on. |
|
Package input input.go Defines the callbacks needed for the whole input package to work.
|
Package input input.go Defines the callbacks needed for the whole input package to work. |
|
Package logic actor.go Defines something Package logic actorregistry.go Defines a container for actor definitions so they can be easily added to the world.
|
Package logic actor.go Defines something Package logic actorregistry.go Defines a container for actor definitions so they can be easily added to the world. |
|
Package traits base.go Defines interfaces that define traits.
|
Package traits base.go Defines interfaces that define traits. |