Added players counter HUD

+ improved some other textures
master
Giov4 2022-06-29 17:48:37 +02:00
parent 07e5223dd2
commit 6769138a3e
6 changed files with 28 additions and 1 deletions

View File

@ -99,6 +99,7 @@ end)
arena_lib.on_time_tick("murder", function(arena)
for pl_name, _ in pairs(arena.players) do
murder.update_HUD(pl_name, "timer_ID", arena.current_time)
murder.update_HUD(pl_name, "pl_counter", arena.players_amount)
end
end)

28
hud.lua
View File

@ -33,6 +33,30 @@ function murder.generate_HUD(arena, pl_name)
z_index = 100,
})
-- Sets the player counter bg.
pl_counter_bg = player:hud_add({
hud_elem_type = "image",
position = {x = 1, y = 0},
offset = {x = -99, y = 72},
text = "HUD_murder_players_counter.png",
alignment = { x = 1.0},
scale = { x = 2, y = 2},
number = 0xFFFFFF,
z_index = 100
})
-- Sets the player counter text.
pl_counter = player:hud_add({
hud_elem_type = "text",
position = {x = 1, y = 0},
offset = {x = -89, y = 75},
text = arena.players_amount,
alignment = { x = 1.0},
scale = { x = 2, y = 2},
number = 0xFFFFFF,
z_index = 100,
})
-- Sets the role text.
role = player:hud_add({
hud_elem_type = "text",
@ -61,7 +85,9 @@ function murder.generate_HUD(arena, pl_name)
role_ID = role,
backgound_ID = background,
timer_ID = timer,
vignette_ID = vignette
vignette_ID = vignette,
pl_counter_bg = pl_counter_bg,
pl_counter = pl_counter
}
end

Binary file not shown.

Before

Width:  |  Height:  |  Size: 657 B

After

Width:  |  Height:  |  Size: 699 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 455 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 513 B

After

Width:  |  Height:  |  Size: 561 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 164 B

After

Width:  |  Height:  |  Size: 162 B