summaryrefslogtreecommitdiff
path: root/level.go
diff options
context:
space:
mode:
authordavidovski <david@davidovski.xyz>2024-04-23 19:05:02 +0100
committerdavidovski <david@davidovski.xyz>2024-04-23 19:05:02 +0100
commita77fc96b2e5f125d5bb0e920fe60d8111f9a2b69 (patch)
tree28409fc37861b1698ddf0669a8e77083e490e691 /level.go
parent69db833ebae7a426fb60d117c67f0b83632618d8 (diff)
add final level
Diffstat (limited to 'level.go')
-rw-r--r--level.go94
1 files changed, 92 insertions, 2 deletions
diff --git a/level.go b/level.go
index 883dea0..13937a6 100644
--- a/level.go
+++ b/level.go
@@ -298,7 +298,7 @@ func StartLevel6(g *Game) {
g.QueueState(levelStart)
- g.audioPlayer.voiceAudio[6].Play()
+ g.audioPlayer.voiceAudio[9].Play()
g.toPlace = append(g.toPlace, NewHPlatform(g, 0, 0))
g.toPlace = append(g.toPlace, NewHPlatform(g, 0, 0))
@@ -376,6 +376,7 @@ func StartLevel7(g *Game) {
g.toPlace = append(g.toPlace, NewRightSideSpring(g, 0, 0))
g.toPlace = append(g.toPlace, NewSpring(g, 0, 0))
+ g.audioPlayer.voiceAudio[6].Play()
// after end
g.QueueState(ReverseLevel)
// after reversed
@@ -396,6 +397,7 @@ func StartLevel8(g *Game) {
g.exit.x = 5 * tileSize
g.exit.y = 1 * tileSize
+ g.audioPlayer.voiceAudio[7].Play()
// after end
g.QueueState(ReverseLevel)
@@ -403,5 +405,93 @@ func StartLevel8(g *Game) {
g.QueueState(func (g *Game){
afterReversed(g)
})
- g.QueueState(StartLevel7)
+ g.QueueState(StartLevelFinal)
+}
+func StartLevelFinal(g *Game) {
+ g.SetPlacing()
+ //noMoveable(g)
+
+ g.ClearAll()
+ tilemap := NewTilemap([][]int{
+ {
+0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+0, 0, 0, 0, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 0, 0, 0, 0, 0,
+0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+},
+
+ }, 25)
+
+ g.tilemap = &tilemap
+ g.tilemap.UpdateSurface()
+ g.player.startx = 5 * tileSize
+ g.player.starty = 11 * tileSize
+
+ g.exit.startx = 17 * tileSize
+ g.exit.starty = 11 * tileSize
+ g.exit.movable = true
+
+ g.ResetAll()
+ g.playerAi = g.playerAi[:0]
+
+ g.QueueState(levelStart)
+
+ //g.audioPlayer.voiceAudio[3].Play()
+ g.toPlace = append(g.toPlace, NewBox(g, 0, 0))
+ g.toPlace = append(g.toPlace, NewRightSideSpring(g, 0, 0))
+ g.toPlace = append(g.toPlace, NewSpring(g, 0, 0))
+ g.toPlace = append(g.toPlace, NewLeftSideSpring(g, 0, 0))
+ g.toPlace = append(g.toPlace, NewVPlatform(g, 0, 0))
+
+ g.audioPlayer.voiceAudio[10].Play()
+ // after end
+ g.QueueState(ReverseLevel)
+ // after reversed
+ g.QueueState(afterReversed)
+ g.QueueState(StartLevelFinalMore)
+}
+func StartLevelFinalMore(g *Game) {
+ g.SetPlacing()
+ g.toPlace = append(g.toPlace, NewBox(g, 0, 0))
+ g.toPlace = append(g.toPlace, NewSpring(g, 0, 0))
+ g.toPlace = append(g.toPlace, NewSpike(g, 0, 0))
+
+ // after end
+ g.QueueState(ReverseLevel)
+
+ // after reversed
+ g.QueueState(func (g *Game){
+ afterReversed(g)
+ })
+ g.QueueState(StartLevelFinalMore)
}