aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author1029chris <1029chris@gmail.com>2016-08-11 22:53:36 -0700
committer1029chris <1029chris@gmail.com>2016-08-11 22:53:36 -0700
commit353b8a912101d6f20eae1301805765d1223005a9 (patch)
treed8fc100bdb693829c854f758d17bdbf5bdddd6dc
parent126d4f86f79f3f40aeb28bf79e2779281d9af996 (diff)
Popup sound now makes sure it isnt already playing
-rw-r--r--virus2.lua6
1 files changed, 5 insertions, 1 deletions
diff --git a/virus2.lua b/virus2.lua
index 148c88e..19ef279 100644
--- a/virus2.lua
+++ b/virus2.lua
@@ -43,7 +43,11 @@ function drawPopup(id)
love.graphics.setCanvas()
end
function addPopup(rand, x, y, w, h, ad, dup, m)
- notification.sound3:play()
+ if notification.sound3:isPlaying() == true then
+ notification.sound3:rewind()
+ else
+ notification.sound3:play()
+ end
if rand == true then
table.insert(v2.pop.p, 1, {
w = math.random(300,800),