summaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
authordavidovski <david@davidovski.xyz>2024-04-23 15:07:17 +0100
committerdavidovski <david@davidovski.xyz>2024-04-23 15:07:17 +0100
commitc73792133fafc80763297f99a6ca8ff28c2c43cb (patch)
treee2662db8001f8cf94311327aac0ff4e07214ed15 /main.go
parenteeed424b99210c4e436df1b40a0dace9897619a1 (diff)
Tweak wait time
Diffstat (limited to 'main.go')
-rw-r--r--main.go11
1 files changed, 6 insertions, 5 deletions
diff --git a/main.go b/main.go
index 90d5f97..5296557 100644
--- a/main.go
+++ b/main.go
@@ -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()
}