changes:
- exchanged switch+door sprites - added asesprite cheat sheet - implemented door toggle on switch toggle
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user