From c73792133fafc80763297f99a6ca8ff28c2c43cb Mon Sep 17 00:00:00 2001 From: davidovski Date: Tue, 23 Apr 2024 15:07:17 +0100 Subject: Tweak wait time --- objects.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'objects.go') diff --git a/objects.go b/objects.go index 141bf65..aca9209 100644 --- a/objects.go +++ b/objects.go @@ -159,8 +159,8 @@ func (o * GameObject) Update(tilemap Tilemap, others []*GameObject) { } if o.HasCollision(tilemap, others, direction) { - if ! o.onGround && o.vy > gravity*1210 { - o.playLand() + if ! o.onGround && o.vy > gravity*12 { + o.PlayLand() } o.onGround = true; o.vx *= o.friction @@ -264,7 +264,7 @@ func (object * GameObject) Collide(other *GameObject) bool { return ! ( minX2 >= maxX1 || maxX2 <= minX1 || minY2 >= maxY1 || maxY2 <= minY1) } -func (object *GameObject) playLand() { +func (object *GameObject) PlayLand() { jumpid := rand.IntN(2) object.game.audioPlayer.landAudio[jumpid].Rewind() object.game.audioPlayer.landAudio[jumpid].Play() -- cgit v1.2.1