added player loop detection, loose level if last player loops

This commit is contained in:
2024-02-27 18:20:00 +01:00
parent 5d2475d525
commit 707281212a
6 changed files with 76 additions and 25 deletions

View File

@@ -90,6 +90,7 @@ func NewGrid(world *ecs.World,
vel.Speed = config.PLAYERSPEED
player.IsPrimary = tile.IsPrimary
player.Sprites = tile.Tiles
player.LoopPos = &components.Position{Cellsize: tilesize}
case tile.Collectible:
entity := colmapper.New()
pos, render, _ = colmapper.Get(entity)