summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFernando Carmona Varo <ferkiwi@gmail.com>2015-10-22 22:48:02 +0200
committerFernando Carmona Varo <ferkiwi@gmail.com>2015-10-22 22:49:05 +0200
commite024abd75149050db3c1b2705e900e29d8d07148 (patch)
tree00cf1ee8bd2587ffab1b70e953d43613d820fe26
parent6dc6f28c679736d11f81df02370936755e9a0fe8 (diff)
Update HUD in some other places. Using also the eatghost sound now
-rwxr-xr-xgamestate.lua1
-rw-r--r--ghost.lua5
2 files changed, 3 insertions, 3 deletions
diff --git a/gamestate.lua b/gamestate.lua
index 5af47b8..0cfd2e2 100755
--- a/gamestate.lua
+++ b/gamestate.lua
@@ -44,6 +44,7 @@ function mypacman.game_start(pos, player)
-- Set start positions
mypacman.game_reset(id, player)
+ mypacman.update_hud(id, player)
minetest.sound_play("mypacman_beginning", {pos = pos,max_hear_distance = 40,gain = 10.0,})
end
diff --git a/ghost.lua b/ghost.lua
index a4bd46d..7b7eea5 100644
--- a/ghost.lua
+++ b/ghost.lua
@@ -90,10 +90,9 @@ for i in ipairs(ghosts) do
-- set the timer negative so it'll have to wait extra time
self.timer = -ghosts_death_delay
-- play sound and reward player
- minetest.sound_play("mypacman_eatfruit", {pos = p,
- max_hear_distance = 6, gain = 10.0,
- })
+ minetest.sound_play("mypacman_eatghost", {pos = boardcenter,max_hear_distance = 6, object=player, loop=false})
player:get_inventory():add_item('main', 'mypacman:cherrys')
+ mypacman.update_hud(self.gameid, player)
else
-- Ghost catches the player!
gamestate.lives = gamestate.lives - 1