diff options
author | davidovski <david@davidovski.xyz> | 2024-04-22 23:41:21 +0100 |
---|---|---|
committer | davidovski <david@davidovski.xyz> | 2024-04-22 23:41:29 +0100 |
commit | 3891cfbda9947748c159970547e06f89d2508e26 (patch) | |
tree | 436b3b1cc858638aa9e558d1d54bf0862f49a26a /level.go | |
parent | 28d783277b20e016373856d4b2e7a8548b921f16 (diff) |
Add end screen
Diffstat (limited to 'level.go')
-rw-r--r-- | level.go | 16 |
1 files changed, 13 insertions, 3 deletions
@@ -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) } |