This commit is contained in:
GreenComfyTea
2022-02-07 18:21:24 +02:00
parent 9298c94b1d
commit 4e045be5eb
14 changed files with 437 additions and 63 deletions

View File

@@ -2,9 +2,10 @@ local rage_UI_entity = {};
local table_helpers;
local drawing;
function rage_UI_entity.new(bar, text_label, value_label, percentage_label)
function rage_UI_entity.new(visibility, bar, text_label, value_label, percentage_label)
local entity = {};
entity.visibility = visibility;
entity.bar = table_helpers.deep_copy(bar);
entity.text_label = table_helpers.deep_copy(text_label);
entity.value_label = table_helpers.deep_copy(value_label);
@@ -16,6 +17,10 @@ function rage_UI_entity.new(bar, text_label, value_label, percentage_label)
end
function rage_UI_entity.draw(monster, rage_UI, position_on_screen, opacity_scale)
if not rage_UI.visibility then
return;
end
if monster.is_in_rage then
drawing.draw_bar(rage_UI.bar, position_on_screen, opacity_scale, monster.rage_timer_percentage);