- exchanged switch+door sprites
- added asesprite cheat sheet
- implemented door toggle on switch toggle
This commit is contained in:
2024-03-29 11:51:05 +01:00
parent dcf31e46ed
commit 82c67551aa
19 changed files with 184 additions and 14 deletions

View File

@@ -55,6 +55,8 @@ func NewLevel(game *Game, cellsize int, plan *ldtkgo.Level) *Level {
systemlist = append(systemlist, systems.NewDestroyableSystem(game.World, gridcontainer,
game.Cellsize))
systemlist = append(systemlist, systems.NewPairSystem(game.World, gridcontainer))
systemlist = append(systemlist, systems.NewHudSystem(game.World, plan))
mapslice, backupmap := LevelToSlice(game, plan, cellsize)
@@ -176,11 +178,15 @@ func LevelToSlice(game *Game, level *ldtkgo.Level, tilesize int) (Map, Map) {
if ref.Value != nil {
refid := ref.Value.(map[string]interface{})
tile.Ref = refid["entityIid"].(string)
slog.Debug("LOAD TILE", "tileref",
tile.Ref, "tileid", tile.Id,
"name", entity.Identifier,
"isswitch", tile.Switch,
"isdoor", tile.Door,
)
}
}
slog.Debug("LOAD TILE", "tile", entity.TileRect)
tileRect := entity.TileRect
tile.Sprite = tileset.SubImage(