Skip to content
Artem Sedykh edited this page Sep 2, 2022 · 2 revisions

mizu Mizu Wiki

Help when using Mizu and other useful info.

Contents

back Automatic binding of system dependencies

Mizu automatically binds all exported structure fields to be used as systems (embedded fields also count). You can control this behavior. If you want to use some of the fields for internal calculation, make them private.

type Rendering struct {
        // Will be linked to the current entity when iterating
        *component.Position
        *component.Velocity

        // Will not be used, you can do with it what you want
	offscreen *ebiten.Image
}

func (r *Rendering) Update(w engine.World) {...}
func (r *Rendering) Draw(w engine.World, screen *ebiten.Image) {...}
Clone this wiki locally