Versions in this module Expand all Collapse all v0 v0.0.2 Oct 18, 2024 Changes in this version + const Skip + var Behaviours = []reflect.Type + var BoundingBoxerType = reflect.TypeOf((*BoundingBoxer)(nil)).Elem() + var BoundingRecterType = reflect.TypeOf((*BoundingRecter)(nil)).Elem() + var ColliderType = reflect.TypeOf((*Collider)(nil)).Elem() + var DisablerType = reflect.TypeOf((*Disabler)(nil)).Elem() + var DrawBoxerType = reflect.TypeOf((*DrawBoxer)(nil)).Elem() + var DrawManagerType = reflect.TypeOf((*DrawManager)(nil)).Elem() + var DrawOrdererType = reflect.TypeOf((*DrawOrderer)(nil)).Elem() + var DrawerType = reflect.TypeOf((*Drawer)(nil)).Elem() + var HiderType = reflect.TypeOf((*Hider)(nil)).Elem() + var IdentifierType = reflect.TypeOf((*Identifier)(nil)).Elem() + var LoaderType = reflect.TypeOf((*Loader)(nil)).Elem() + var PrepperType = reflect.TypeOf((*Prepper)(nil)).Elem() + var RegistrarType = reflect.TypeOf((*Registrar)(nil)).Elem() + var SaverType = reflect.TypeOf((*Saver)(nil)).Elem() + var ScannerType = reflect.TypeOf((*Scanner)(nil)).Elem() + var TransformerType = reflect.TypeOf((*Transformer)(nil)).Elem() + var UpdaterType = reflect.TypeOf((*Updater)(nil)).Elem() + func LoadGobz(dst any, assets fs.FS, path string) error + func SaveGobz(src any, name string) error + type Actor struct + Bounds geom.Box + CollisionDomain string + Pos geom.Int3 + func (a *Actor) BoundingBox() geom.Box + func (a *Actor) CollidesAt(p geom.Int3) bool + func (a *Actor) MoveX(x float64, onCollide func()) + func (a *Actor) MoveY(y float64, onCollide func()) + func (a *Actor) MoveZ(z float64, onCollide func()) + func (a *Actor) Prepare(g *Game) error + func (a *Actor) String() string + type Anim struct + Def *AnimDef + Index int + Ticks int + func (a *Anim) Cell() int + func (a *Anim) Reset() + func (a *Anim) Update() error + type AnimDef struct + OneShot bool + Steps []AnimStep + func (d *AnimDef) NewAnim() *Anim + type AnimStep struct + Cell int + Duration int + type AnimatedTile struct + AnimKey string + func (a *AnimatedTile) Cell() int + func (a *AnimatedTile) Scan(visit VisitFunc) error + type Billboard struct + Pos geom.Int3 + Src ImageRef + func (b *Billboard) BoundingBox() geom.Box + func (b *Billboard) Draw(screen *ebiten.Image, opts *ebiten.DrawImageOptions) + func (b *Billboard) Prepare(g *Game) error + func (b *Billboard) Scan(visit VisitFunc) error + func (b *Billboard) String() string + func (b *Billboard) Transform() (opts ebiten.DrawImageOptions) + type BoundingBoxer interface + BoundingBox func() geom.Box + type BoundingRecter interface + BoundingRect func() image.Rectangle + type Bounds image.Rectangle + func (b Bounds) BoundingRect() image.Rectangle + type Camera struct + Centre image.Point + Child any + Rotation float64 + Zoom float64 + func (c *Camera) PointAt(centre geom.Int3, zoom float64) + func (c *Camera) Prepare(game *Game) error + func (c *Camera) Scan(visit VisitFunc) error + func (c *Camera) String() string + func (c *Camera) Transform() (opts ebiten.DrawImageOptions) + type Collider interface + CollidesWith func(geom.Box) bool + type Container struct + func MakeContainer(items ...any) *Container + func (c *Container) Add(component any) + func (c *Container) Contains(component any) bool + func (c *Container) Element(i int) any + func (c *Container) GobDecode(in []byte) error + func (c *Container) GobEncode() ([]byte, error) + func (c *Container) IndexOf(component any) (int, bool) + func (c *Container) ItemCount() int + func (c *Container) Len() int + func (c *Container) Remove(component any) + func (c *Container) Scan(visit VisitFunc) error + func (c *Container) String() string + func (c *Container) Swap(i, j int) + type DebugToast struct + Pos image.Point + Text string + Timer int + func (d *DebugToast) Draw(screen *ebiten.Image, _ *ebiten.DrawImageOptions) + func (d *DebugToast) String() string + func (d *DebugToast) Toast(text string) + func (d *DebugToast) Update() error + type Disabler interface + Disable func() + Disabled func() bool + Enable func() + type Disables bool + func (d *Disables) Disable() + func (d *Disables) Enable() + func (d Disables) Disabled() bool + type DrawBoxer interface + type DrawDAG struct + Child any + ChunkSize int + func (DrawDAG) ManagesDrawingSubcomponents() + func (d *DrawDAG) Draw(screen *ebiten.Image, opts *ebiten.DrawImageOptions) + func (d *DrawDAG) Prepare(game *Game) error + func (d *DrawDAG) Register(component, _ any) error + func (d *DrawDAG) Scan(visit VisitFunc) error + func (d *DrawDAG) String() string + func (d *DrawDAG) Unregister(component any) + func (d *DrawDAG) Update() error + func (d DrawDAG) Dot() string + type DrawDFS struct + Child any + func (DrawDFS) ManagesDrawingSubcomponents() + func (d *DrawDFS) Draw(screen *ebiten.Image, opts *ebiten.DrawImageOptions) + func (d *DrawDFS) Prepare(g *Game) error + func (d *DrawDFS) Scan(visit VisitFunc) error + func (d *DrawDFS) String() string + type DrawManager interface + ManagesDrawingSubcomponents func() + type DrawOrderer interface + DrawAfter func(Drawer) bool + DrawBefore func(Drawer) bool + type Drawer interface + Draw func(*ebiten.Image, *ebiten.DrawImageOptions) + type DummyLoad struct + func (d DummyLoad) Load(fs.FS) error + type Fill struct + Colour color.Color + func (f *Fill) Draw(screen *ebiten.Image, opts *ebiten.DrawImageOptions) + func (f *Fill) String() string + type Game struct + Projection geom.Projector + Root Drawer + ScreenSize image.Point + VoxelScale geom.Float3 + func (g *Game) Children(c any) *Container + func (g *Game) Component(id string) Identifier + func (g *Game) Draw(screen *ebiten.Image) + func (g *Game) Ident() string + func (g *Game) Layout(outsideWidth, outsideHeight int) (w, h int) + func (g *Game) Load(component any, assets fs.FS) error + func (g *Game) LoadAndPrepare(assets fs.FS) error + func (g *Game) Parent(c any) any + func (g *Game) Path(component any) []any + func (g *Game) PathRegister(component, parent any) error + func (g *Game) PathUnregister(component any) + func (g *Game) Prepare(component any) error + func (g *Game) Query(ancestor any, behaviour reflect.Type, visitPre, visitPost VisitFunc) error + func (g *Game) REPL(src io.Reader, dst io.Writer, assets fs.FS) error + func (g *Game) Register(component, parent any) error + func (g *Game) ReversePath(component any) []any + func (g *Game) Scan(visit VisitFunc) error + func (g *Game) String() string + func (g *Game) Unregister(component any) + func (g *Game) Update() error + type Hider interface + Hidden func() bool + Hide func() + Show func() + type Hides bool + func (h *Hides) Hide() + func (h *Hides) Show() + func (h Hides) Hidden() bool + type ID string + func (id ID) Ident() string + type Identifier interface + Ident func() string + type ImageRef struct + Path string + func (r *ImageRef) Image() *ebiten.Image + func (r *ImageRef) Load(assets fs.FS) error + func (r *ImageRef) String() string + type Loader interface + Load func(fs.FS) error + type LoadingSwitch struct + After interface{ ... } + During interface{ ... } + func (s *LoadingSwitch) Load(assets fs.FS) error + func (s *LoadingSwitch) Prepare(game *Game) error + func (s *LoadingSwitch) Scan(visit VisitFunc) error + type Parallax struct + CameraID string + Child any + Factor float64 + func (p *Parallax) Prepare(game *Game) error + func (p *Parallax) Scan(visit VisitFunc) error + func (p *Parallax) String() string + func (p *Parallax) Transform() (opts ebiten.DrawImageOptions) + type PerfDisplay struct + func (PerfDisplay) String() string + func (p PerfDisplay) Draw(screen *ebiten.Image, _ *ebiten.DrawImageOptions) + type Prepper interface + Prepare func(game *Game) error + type Prism struct + Cell int + func (p *Prism) BoundingBox() geom.Box + func (p *Prism) Draw(screen *ebiten.Image, opts *ebiten.DrawImageOptions) + func (p *Prism) DrawAfter(x Drawer) bool + func (p *Prism) DrawBefore(x Drawer) bool + func (p *Prism) String() string + func (p *Prism) Transform() (opts ebiten.DrawImageOptions) + type PrismMap struct + DrawOffset image.Point + Ersatz bool + Map map[geom.Int3]*Prism + PosToWorld geom.IntMatrix3x4 + PrismSize geom.Int3 + PrismTop []image.Point + Sheet Sheet + func (m *PrismMap) CollidesWith(b geom.Box) bool + func (m *PrismMap) Prepare(g *Game) error + func (m *PrismMap) Scan(visit VisitFunc) error + func (m *PrismMap) String() string + func (m *PrismMap) Transform() (opts ebiten.DrawImageOptions) + type Registrar interface + Register func(component, parent any) error + Unregister func(component any) + type Saver interface + Save func() error + type Scanner interface + Scan func(visit VisitFunc) error + type Scene struct + Child any + func (s *Scene) Scan(visit VisitFunc) error + func (s *Scene) String() string + type SceneRef struct + Path string + func (r *SceneRef) GobDecode(b []byte) error + func (r *SceneRef) GobEncode() ([]byte, error) + func (r *SceneRef) Load(assets fs.FS) error + func (r *SceneRef) Save() error + func (r *SceneRef) String() string + type Sheet struct + AnimDefs map[string]*AnimDef + CellSize image.Point + Src ImageRef + func (s *Sheet) NewAnim(key string) *Anim + func (s *Sheet) NewAnims() map[string]*Anim + func (s *Sheet) Prepare(*Game) error + func (s *Sheet) Scan(visit VisitFunc) error + func (s *Sheet) String() string + func (s *Sheet) SubImage(i int) *ebiten.Image + type SolidRect struct + func (s SolidRect) CollidesWith(r geom.Box) bool + type Sprite struct + Actor Actor + DrawOffset image.Point + Sheet Sheet + func (s *Sprite) Anim() *Anim + func (s *Sprite) BoundingBox() geom.Box + func (s *Sprite) Draw(screen *ebiten.Image, opts *ebiten.DrawImageOptions) + func (s *Sprite) Scan(visit VisitFunc) error + func (s *Sprite) SetAnim(a *Anim) + func (s *Sprite) String() string + func (s *Sprite) Transform() (opts ebiten.DrawImageOptions) + func (s *Sprite) Update() error + type StaticTile int + func (s StaticTile) Cell() int + type Tile interface + Cell func() int + type Tilemap struct + Ersatz bool + Map map[image.Point]Tile + Offset image.Point + Sheet Sheet + func (t *Tilemap) CollidesWith(b geom.Box) bool + func (t *Tilemap) Draw(screen *ebiten.Image, opts *ebiten.DrawImageOptions) + func (t *Tilemap) Load(fs.FS) error + func (t *Tilemap) Scan(visit VisitFunc) error + func (t *Tilemap) SetTileAt(wc image.Point, tile Tile) + func (t *Tilemap) TileAt(wc image.Point) Tile + func (t *Tilemap) TileBounds(wc image.Point) image.Rectangle + func (t *Tilemap) Transform() (opts ebiten.DrawImageOptions) + type Transformer interface + Transform func() ebiten.DrawImageOptions + type Updater interface + Update func() error + type VisitFunc func(any) error + func (v VisitFunc) Many(x ...any) error + type Wall struct + Ersatz bool + Offset image.Point + Sheet Sheet + UnitOffset image.Point + UnitSize image.Point + Units map[image.Point]*WallUnit + func (w *Wall) CollidesWith(b geom.Box) bool + func (w *Wall) Prepare(*Game) error + func (w *Wall) Scan(visit VisitFunc) error + func (w *Wall) Transform() (opts ebiten.DrawImageOptions) + type WallUnit struct + Tile Tile + func (u *WallUnit) Draw(screen *ebiten.Image, opts *ebiten.DrawImageOptions) + func (u *WallUnit) Scan(visit VisitFunc) error + func (u *WallUnit) Transform() (opts ebiten.DrawImageOptions)