Documentation ¶
Overview ¶
Package systems provides the various systems used by the engine
Index ¶
Constants ¶
View Source
const (
// TypeAnimator is the name of the animator system.
TypeAnimator = "animator"
)
View Source
const (
// TypeMovement is the name of the movement system.
TypeMovement = "mover"
)
View Source
const (
// TypeRenderer is the name of the renderer system.
TypeRenderer = "renderer"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Movement ¶
type Movement interface { System // Process updates entities position based on their velocities. Process(elapsed float32) }
Movement represents a system that knows how to alter an Entity's position based on its velocities.
type Renderer ¶
type Renderer interface { System // Process renders all renderable entities. Process() // LoadCamera sets the camera to be used by the display. LoadCamera(camera components.Camera) }
Renderer provides the interface needed to process the rendering of Entities. Each time Process is called all Entities will be rendered.
type System ¶
type System interface { // Type retrieves the type of system such as renderer, mover, etc. Type() string // AddEntity adds an Entity to the system. Each system will have a component requirement that must be met before the Entity can be added. AddEntity(e entity.Entity) // RemoveEntity removes an Entity from the system. RemoveEntity(e entity.Entity) // IsRunning returns true if the system is currently processing entities, false otherwise. IsRunning() bool // Start causes the system to begin processing all Entities which have been added. Start() // Stop stops the system. Entities are not removed, but the the system will not perform any additional processing until it is started again. Stop() // Terminate stops the system and cleans up all resources. Terminate() }
System represents the behavior all engine systems should implement.
Click to show internal directories.
Click to hide internal directories.