Documentation ¶
Index ¶
- func NewQuery(l LayerID, f filter.LayoutFilter) *donburi.Query
- type Arg
- type ECS
- func (ecs *ECS) AddRenderer(l LayerID, r any) *ECS
- func (ecs *ECS) AddSystem(s System) *ECS
- func (ecs *ECS) Create(l LayerID, components ...donburi.IComponentType) donburi.Entity
- func (ecs *ECS) CreateMany(l LayerID, n int, components ...donburi.IComponentType) []donburi.Entity
- func (ecs *ECS) Draw(arg any)
- func (ecs *ECS) DrawLayer(l LayerID, arg any)
- func (ecs *ECS) IsPaused() bool
- func (ecs *ECS) Pause()
- func (ecs *ECS) Resume()
- func (ecs *ECS) Update()
- type Layer
- type LayerID
- type RendererWithArg
- type System
- type Time
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ECS ¶
type ECS struct { // World is the underlying world of the ECS. World donburi.World // Time manages the time of the world. Time *Time // contains filtered or unexported fields }
ECS represents an entity-component-system.
func (*ECS) AddRenderer ¶ added in v1.2.24
AddRenderer adds a renderer.
func (*ECS) CreateMany ¶ added in v1.2.10
Create creates a new entity
func (*ECS) DrawLayer ¶ added in v1.2.13
DrawLayer executes all draw systems of the specified layer.
type LayerID ¶ added in v1.2.10
type LayerID int
LayerID is used to specify a layer.
const LayerDefault LayerID = 0
LayerDefault is the default layer.
type RendererWithArg ¶ added in v1.3.13
DrawSystem is a system that draws the world.
type System ¶ added in v1.2.1
type System func(ecs *ECS)
UpdateSystem is a system that updates the world.
type Time ¶
type Time struct {
// contains filtered or unexported fields
}
Time manages the time of the world.
func (*Time) SetTimeScale ¶ added in v1.2.11
SetTimeScale sets the time scale.
Click to show internal directories.
Click to hide internal directories.