Files
realworld/inc/scene.manager.go
T
2026-08-30 23:01:48 +02:00

35 lines
505 B
Go

package inc
import (
inkwell "git.teletypegames.org/engines/inkwell"
)
type Scene = inkwell.Scene
var sceneFloor = []inkwell.Polygon{
inkwell.Poly(
inkwell.Point{
X: 16,
Y: 196,
}, inkwell.Point{
X: 624,
Y: 196,
},
inkwell.Point{
X: 624,
Y: 258,
}, inkwell.Point{
X: 16,
Y: 258,
},
),
}
func setVarIfEmpty(name string, v any) inkwell.Action {
return Fn(func(ctx *inkwell.Ctx) {
if ctx.Game.State.Var(name) == nil {
ctx.Game.State.SetVar(name, v)
}
})
}