diff options
author | davidovski <david@davidovski.xyz> | 2024-04-23 14:46:27 +0100 |
---|---|---|
committer | davidovski <david@davidovski.xyz> | 2024-04-23 14:46:27 +0100 |
commit | 5fe8960b575f5b0216faafe496a2a9927fb1bb9c (patch) | |
tree | 01d3414764c02a2748cea7ea2122b78c41660767 /level.go | |
parent | 01d37cd3369d7b17bb42fd4e26ecdd4732d75baa (diff) |
add menu
Diffstat (limited to 'level.go')
-rw-r--r-- | level.go | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -5,6 +5,13 @@ import ( ) func StartGame(g *Game) { + //g.state = IN_GAME + g.player = NewPlayer(g, 4 * tileSize, 9 * tileSize) + g.objects = append(g.objects, g.player) + g.exit = NewExit(g, 21 * tileSize, 9 * tileSize) + g.objects = append(g.objects, g.exit) + + g.ResetAll() StartLevel1(g) } @@ -43,7 +50,7 @@ func noMoveable(g *Game) { func StartLevel1(g *Game ) { - g.SetInGame() + //g.SetInGame() tilemap := NewTilemap([][]int{ { @@ -206,6 +213,8 @@ func StartLevel5(g *Game) { //g.toPlace = append(g.toPlace, NewSpring(g, 0, 0)) g.exit.movable = true + g.toPlace = append(g.toPlace, g.exit) + g.RemoveObject(g.exit) g.toPlace = append(g.toPlace, NewSpring(g, 0, 0)) // after end g.QueueState(ReverseLevel) |