режим предателя + UI референсы и DragonUI

This commit is contained in:
2026-04-09 02:05:29 +04:00
parent 1109d19bb5
commit e8f1ae4ab9
397 changed files with 202750 additions and 37 deletions
+32
View File
@@ -0,0 +1,32 @@
function HealthBar_OnValueChanged(self, value, smooth)
if ( not value ) then
return;
end
local r, g, b;
local min, max = self:GetMinMaxValues();
if ( (value < min) or (value > max) ) then
return;
end
if ( (max - min) > 0 ) then
value = (value - min) / (max - min);
else
value = 0;
end
if(smooth) then
if(value > 0.5) then
r = (1.0 - value) * 2;
g = 1.0;
else
r = 1.0;
g = value * 2;
end
else
r = 0.0;
g = 1.0;
end
b = 0.0;
if ( not self.lockColor ) then
self:SetStatusBarColor(r, g, b);
end
end