diff options
author | davidovski <david@davidovski.xyz> | 2024-04-23 15:07:17 +0100 |
---|---|---|
committer | davidovski <david@davidovski.xyz> | 2024-04-23 15:07:17 +0100 |
commit | c73792133fafc80763297f99a6ca8ff28c2c43cb (patch) | |
tree | e2662db8001f8cf94311327aac0ff4e07214ed15 /main.go | |
parent | eeed424b99210c4e436df1b40a0dace9897619a1 (diff) |
Tweak wait time
Diffstat (limited to 'main.go')
-rw-r--r-- | main.go | 11 |
1 files changed, 6 insertions, 5 deletions
@@ -33,9 +33,9 @@ const ( friction = 0.75 airResistance = 0.98 - endCardDuration = 200 + endCardDuration = 240 - exitTransitionWeight = 0.8 + exitTransitionWeight = 0.7 ghostAlpha = 0.5 hightlightBorder = 2 audioFadeIn = 0.999 @@ -43,6 +43,7 @@ const ( sampleRate = 44100 shadowOffset = 1 + killPlayerAfter = 80 musicLoopLength = 230 menuFadeInTime = 80 @@ -229,7 +230,7 @@ func (g * Game)ReplayPlayerAi() { } g.playerAiIdx += 1 - if g.playerAiIdx >= len(g.playerAi) * 2 { + if g.playerAiIdx >= len(g.playerAi) + killPlayerAfter { g.KillPlayer() } @@ -290,7 +291,7 @@ func (g *Game) Update() error { } if inpututil.IsMouseButtonJustReleased(ebiten.MouseButton0) { bo = buttonOffset - if onButton { + if onButton && g.animStart <= 0{ g.animStart = g.time + 60 StartGame(g) } @@ -445,7 +446,7 @@ func (g *Game) PlaceObject(cx, cy int) { g.objects = append(g.objects, placeable) g.toPlace = g.toPlace[1:len(g.toPlace)] - + placeable.PlayLand() if len(g.toPlace) == 0 && len(g.playerAi) == 0 { g.TransitionState() } |