summaryrefslogtreecommitdiff
path: root/scorehud.lua
diff options
context:
space:
mode:
authorFernando Carmona Varo <ferkiwi@gmail.com>2015-10-23 19:24:49 +0200
committerFernando Carmona Varo <ferkiwi@gmail.com>2015-10-23 19:24:49 +0200
commit611fc24518c435aac82b28b8a1ea0e832930325f (patch)
tree57ecb4e21027697a82840509fc6b15a198cb29df /scorehud.lua
parente024abd75149050db3c1b2705e900e29d8d07148 (diff)
Some improvements to the HUD
Diffstat (limited to 'scorehud.lua')
-rwxr-xr-xscorehud.lua35
1 files changed, 0 insertions, 35 deletions
diff --git a/scorehud.lua b/scorehud.lua
deleted file mode 100755
index dbdfd7f..0000000
--- a/scorehud.lua
+++ /dev/null
@@ -1,35 +0,0 @@
-
-
-local hud_table = {}
-
-function mypacman.update_hud(id, player)
- local game = mypacman.games[id]
- player = player or minetest.get_player_by_name(game.player_name)
- if not player then
- return
- end
- local hudtext = "Score: " .. game.score
- local hud = hud_table[game.player_name]
- if not hud then
- hud = player:hud_add({
- hud_elem_type = "text",
- position = {x = 1, y = 0},
- offset = {x=-400, y = 75},
- scale = {x = 100, y = 100},
- number = 0xFFFFFF, --color
- text = hudtext
- })
- hud_table[game.player_name] = hud
- else
- player:hud_change(hud, "text", hudtext)
- end
-end
-
-
-function mypacman.remove_hud(player, playername)
- local name = playername or player:get_player_name()
- local hud = hud_table[name]
- if hud then
- player:hud_remove(hud)
- end
-end