From: Clyne Sullivan Date: Wed, 2 Oct 2019 17:51:26 +0000 (-0400) Subject: beautiful ball bounce sound X-Git-Url: https://code.bitgloo.com/?a=commitdiff_plain;h=16a29df61f6cbc546123c91a0b72d1bfb68d6de2;p=clyne%2Fgamedev2.git beautiful ball bounce sound --- diff --git a/Assets/boing.wav b/Assets/boing.wav new file mode 100644 index 0000000..a142197 Binary files /dev/null and b/Assets/boing.wav differ diff --git a/Scripts/init.lua b/Scripts/init.lua index d09fb14..96e031a 100644 --- a/Scripts/init.lua +++ b/Scripts/init.lua @@ -80,10 +80,14 @@ ball = { }, Idle = function(self) if self.Physics.standing == true then + game.play(self.Position, self.Audio) self.Velocity.y = self.Velocity.y + 15 self.Velocity.x = math.random(-1, 1); end end, + Audio = { + file = "Assets/boing.wav" + }, } -- Create the world