]> code.bitgloo.com Git - clyne/gamedev2.git/commitdiff
beautiful ball bounce sound
authorClyne Sullivan <clyne@bitgloo.com>
Wed, 2 Oct 2019 17:51:26 +0000 (13:51 -0400)
committerClyne Sullivan <clyne@bitgloo.com>
Wed, 2 Oct 2019 17:51:26 +0000 (13:51 -0400)
Assets/boing.wav [new file with mode: 0644]
Scripts/init.lua

diff --git a/Assets/boing.wav b/Assets/boing.wav
new file mode 100644 (file)
index 0000000..a142197
Binary files /dev/null and b/Assets/boing.wav differ
index d09fb141810224524751db7657e6884a668597d3..96e031afa8b5c85d293edf382c02de5b501c42d3 100644 (file)
@@ -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