From 3891cfbda9947748c159970547e06f89d2508e26 Mon Sep 17 00:00:00 2001 From: davidovski Date: Mon, 22 Apr 2024 23:41:21 +0100 Subject: Add end screen --- level.go | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'level.go') 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) } -- cgit v1.2.1