Skip to content

Commit e50ee25

Browse files
committed
change boom start range
1 parent 00a7b2b commit e50ee25

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

main.go

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ const (
2323
screenHeight = 456
2424
sampleRate = 44100
2525
loopStart = 6 * 60
26-
loopEnd = 21 * 60
26+
loopEnd = 22 * 60
27+
startBoom = 248
2728
)
2829

2930
//go:embed assets/img/*.png
@@ -220,7 +221,7 @@ func (g *Game) chooseBubbleType() int {
220221
func (g *Game) generateBubbles() {
221222
g.bubbles = []Bubble{}
222223

223-
bubbleBoom := 250
224+
bubbleBoom := 140
224225

225226
for i := 0; i < 100; i++ {
226227
g.addBubble(bubbleBoom)
@@ -466,16 +467,16 @@ func (g *Game) drawTitle(screen *ebiten.Image) {
466467
height := 180.0
467468

468469
y := 32.0
469-
if frame >= 244 {
470+
if frame >= startBoom {
470471
oscY := math.Sin(float64(frame)/50*2) * 10.0
471472
y = 22.0 + oscY
472473
}
473474

474475
alpha := 0.0
475-
if frame >= 244 {
476+
if frame >= startBoom {
476477
alpha = 1.0
477-
} else if frame >= 243 {
478-
alpha = float64(frame - 243)
478+
} else if frame >= startBoom-1 {
479+
alpha = float64(frame - startBoom - 1)
479480
}
480481

481482
op := &ebiten.DrawImageOptions{}
@@ -510,10 +511,10 @@ func (g *Game) drawBoom(screen *ebiten.Image) {
510511
if !g.introPlayer.IsPlaying() && frame <= 256 {
511512
alpha := 0.0
512513

513-
if frame <= 246 {
514+
if frame <= startBoom {
514515
alpha = 1.0
515516
} else {
516-
alpha = 1.0 - float64(frame-246)/10.0
517+
alpha = 1.0 - float64(frame-startBoom)/10.0
517518
}
518519

519520
op := &ebiten.DrawImageOptions{}
@@ -537,7 +538,7 @@ func (g *Game) Update() error {
537538
g.introPlayer.Play()
538539
}
539540

540-
if g.count >= 248 && g.loopPlayer != nil && !g.loopPlayer.IsPlaying() {
541+
if g.count >= startBoom && g.loopPlayer != nil && !g.loopPlayer.IsPlaying() {
541542
g.loopPlayer.Play()
542543
}
543544

0 commit comments

Comments
 (0)