summaryrefslogtreecommitdiff
path: root/level.go
diff options
context:
space:
mode:
authordavidovski <david@davidovski.xyz>2024-04-22 23:41:21 +0100
committerdavidovski <david@davidovski.xyz>2024-04-22 23:41:29 +0100
commit3891cfbda9947748c159970547e06f89d2508e26 (patch)
tree436b3b1cc858638aa9e558d1d54bf0862f49a26a /level.go
parent28d783277b20e016373856d4b2e7a8548b921f16 (diff)
Add end screen
Diffstat (limited to 'level.go')
-rw-r--r--level.go16
1 files changed, 13 insertions, 3 deletions
diff --git a/level.go b/level.go
index f52c01b..24c79ff 100644
--- a/level.go
+++ b/level.go
@@ -3,9 +3,12 @@ package main
import (
"fmt"
)
+func PauseScreen(g *Game) {
+ g.SetPaused()
+ fmt.Printf("PAUSE\n", 0, len(g.playerAi))
+}
func ReverseLevel(g *Game) {
- fmt.Printf("pframe %d/%d\n", 0, len(g.playerAi))
g.SetReversing()
}
@@ -87,10 +90,17 @@ func StartLevel1(g *Game ) {
g.state = END
})
+ g.QueueState(PauseScreen)
// after end
- g.QueueState(ReverseLevel)
+ g.QueueState(func (g *Game){
+ g.animStart = g.time - endCardDuration
+ ReverseLevel(g)
+ })
// after reversed
- g.QueueState(afterReversed)
+ g.QueueState(func (g *Game){
+ g.animStart = 0
+ afterReversed(g)
+ })
g.QueueState(StartLevel2)
}