@@ -23,7 +23,8 @@ const (
23
23
screenHeight = 456
24
24
sampleRate = 44100
25
25
loopStart = 6 * 60
26
- loopEnd = 21 * 60
26
+ loopEnd = 22 * 60
27
+ startBoom = 248
27
28
)
28
29
29
30
//go:embed assets/img/*.png
@@ -220,7 +221,7 @@ func (g *Game) chooseBubbleType() int {
220
221
func (g * Game ) generateBubbles () {
221
222
g .bubbles = []Bubble {}
222
223
223
- bubbleBoom := 250
224
+ bubbleBoom := 140
224
225
225
226
for i := 0 ; i < 100 ; i ++ {
226
227
g .addBubble (bubbleBoom )
@@ -466,16 +467,16 @@ func (g *Game) drawTitle(screen *ebiten.Image) {
466
467
height := 180.0
467
468
468
469
y := 32.0
469
- if frame >= 244 {
470
+ if frame >= startBoom {
470
471
oscY := math .Sin (float64 (frame )/ 50 * 2 ) * 10.0
471
472
y = 22.0 + oscY
472
473
}
473
474
474
475
alpha := 0.0
475
- if frame >= 244 {
476
+ if frame >= startBoom {
476
477
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 )
479
480
}
480
481
481
482
op := & ebiten.DrawImageOptions {}
@@ -510,10 +511,10 @@ func (g *Game) drawBoom(screen *ebiten.Image) {
510
511
if ! g .introPlayer .IsPlaying () && frame <= 256 {
511
512
alpha := 0.0
512
513
513
- if frame <= 246 {
514
+ if frame <= startBoom {
514
515
alpha = 1.0
515
516
} else {
516
- alpha = 1.0 - float64 (frame - 246 )/ 10.0
517
+ alpha = 1.0 - float64 (frame - startBoom )/ 10.0
517
518
}
518
519
519
520
op := & ebiten.DrawImageOptions {}
@@ -537,7 +538,7 @@ func (g *Game) Update() error {
537
538
g .introPlayer .Play ()
538
539
}
539
540
540
- if g .count >= 248 && g .loopPlayer != nil && ! g .loopPlayer .IsPlaying () {
541
+ if g .count >= startBoom && g .loopPlayer != nil && ! g .loopPlayer .IsPlaying () {
541
542
g .loopPlayer .Play ()
542
543
}
543
544
0 commit comments