summaryrefslogtreecommitdiff
path: root/level.go
diff options
context:
space:
mode:
Diffstat (limited to 'level.go')
-rw-r--r--level.go161
1 files changed, 156 insertions, 5 deletions
diff --git a/level.go b/level.go
index 5c95861..883dea0 100644
--- a/level.go
+++ b/level.go
@@ -155,6 +155,7 @@ func StartLevel3(g *Game) {
func StartLevel4(g *Game) {
g.SetPlacing()
+ g.animStart = 0
noMoveable(g)
g.toPlace = append(g.toPlace, NewSpring(g, 0, 0))
@@ -241,16 +242,166 @@ func StartLevel6(g *Game) {
g.SetPlacing()
//noMoveable(g)
+ g.ClearAll()
+ tilemap := NewTilemap([][]int{
+ {
+37, 38, 39, 37, 38, 39, 37, 38, 39, 37, 38, 39, 37, 38, 39, 37, 38, 39, 37, 38, 39, 37, 38, 39, 37,
+53, 54, 55, 53, 54, 55, 53, 54, 55, 53, 54, 55, 53, 54, 55, 53, 54, 55, 53, 54, 55, 53, 54, 55, 53,
+69, 70, 71, 69, 70, 71, 69, 70, 71, 69, 70, 71, 69, 70, 71, 69, 70, 71, 69, 70, 71, 69, 70, 71, 69,
+37, 38, 39, 37, 38, 39, 37, 38, 39, 37, 38, 39, 37, 38, 39, 37, 38, 39, 37, 38, 39, 37, 38, 39, 37,
+53, 54, 55, 53, 54, 55, 53, 54, 55, 53, 54, 55, 53, 54, 55, 53, 54, 55, 53, 54, 55, 53, 54, 55, 53,
+69, 70, 71, 69, 70, 71, 69, 70, 71, 69, 70, 71, 69, 70, 71, 69, 70, 71, 69, 70, 71, 69, 70, 71, 69,
+37, 38, 39, 37, 38, 39, 37, 38, 39, 37, 38, 39, 37, 38, 39, 37, 38, 39, 37, 38, 39, 37, 38, 39, 37,
+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, 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, 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, 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, 98, 82, 82, 82, 114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 98, 82, 82, 82, 114, 0,
+0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 98, 114, 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, 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, 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, 0, 0, 0, 0, 0, 0, 0, 0,
+},
+
+ }, 25)
+
+ g.tilemap = &tilemap
+ g.tilemap.UpdateSurface()
+ g.player.startx = 22 * tileSize
+ g.player.starty = 8 * tileSize
+
+ g.exit.startx = 2 * tileSize
+ g.exit.starty = 8 * tileSize
+
+ g.ResetAll()
+ g.playerAi = g.playerAi[:0]
+
+ g.QueueState(levelStart)
+
g.audioPlayer.voiceAudio[6].Play()
- g.toPlace = append(g.toPlace, NewSpring(g, 0, 0))
- g.toPlace = append(g.toPlace, NewRightSideSpring(g, 0, 0))
- g.toPlace = append(g.toPlace, NewLeftSideSpring(g, 0, 0))
+ g.toPlace = append(g.toPlace, NewHPlatform(g, 0, 0))
+ g.toPlace = append(g.toPlace, NewHPlatform(g, 0, 0))
+
+ // after end
+ g.QueueState(ReverseLevel)
+ // after reversed
+ g.QueueState(afterReversed)
+ g.QueueState(StartLevel7)
+}
+
+// How about this?
+func StartLevel7(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, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+0, 50, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 66, 0, 0, 0, 0, 0,
+0, 70, 71, 69, 70, 71, 69, 70, 71, 69, 70, 71, 69, 70, 71, 69, 70, 71, 69, 70, 0, 0, 0, 0, 0,
+0, 38, 39, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+0, 54, 55, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+0, 70, 71, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0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it.starty = 11 * tileSize
+
+ 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.exit.movable = true
+ 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))
// after end
g.QueueState(ReverseLevel)
// after reversed
g.QueueState(afterReversed)
- g.QueueState(StartLevel6)
+ g.QueueState(StartLevel8)
+}
+
+func StartLevel8(g *Game) {
+ g.SetPlacing()
+ noMoveable(g)
+ g.toPlace = append(g.toPlace, NewVPlatform(g, 0, 0))
+ 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))
+
+ g.exit.startx = 5 * tileSize
+ g.exit.starty = 1 * tileSize
+ g.exit.x = 5 * tileSize
+ g.exit.y = 1 * tileSize
+
+ // after end
+ g.QueueState(ReverseLevel)
+
+ // after reversed
+ g.QueueState(func (g *Game){
+ afterReversed(g)
+ })
+ g.QueueState(StartLevel7)
}