Initial commit.
This commit is contained in:
@@ -0,0 +1,94 @@
|
||||
local c;
|
||||
local player = Var "Player";
|
||||
local ShowComboAt = THEME:GetMetric("Combo", "ShowComboAt");
|
||||
local Pulse = THEME:GetMetric("Combo", "PulseCommand");
|
||||
|
||||
local NumberMinZoom = THEME:GetMetric("Combo", "NumberMinZoom");
|
||||
local NumberMaxZoom = THEME:GetMetric("Combo", "NumberMaxZoom");
|
||||
local NumberMaxZoomAt = THEME:GetMetric("Combo", "NumberMaxZoomAt");
|
||||
|
||||
local t = Def.ActorFrame {
|
||||
--[[ LoadActor(THEME:GetPathG("Combo","100Milestone")) .. {
|
||||
Name="OneHundredMilestone";
|
||||
};
|
||||
LoadActor(THEME:GetPathG("Combo","1000Milestone")) .. {
|
||||
Name="OneThousandMilestone";
|
||||
}; --]]
|
||||
LoadFont( "Combo", "numbers" ) .. {
|
||||
Name="Number";
|
||||
OnCommand = THEME:GetMetric("Combo", "NumberOnCommand");
|
||||
};
|
||||
LoadFont("Common Normal") .. {
|
||||
Name="Label";
|
||||
OnCommand = THEME:GetMetric("Combo", "LabelOnCommand");
|
||||
};
|
||||
|
||||
InitCommand = function(self)
|
||||
c = self:GetChildren();
|
||||
c.Number:visible(false);
|
||||
c.Label:visible(false);
|
||||
end;
|
||||
|
||||
ComboCommand=function(self, param)
|
||||
local iCombo = param.Misses or param.Combo;
|
||||
if not iCombo or iCombo < ShowComboAt then
|
||||
c.Number:visible(false);
|
||||
c.Label:visible(false);
|
||||
return;
|
||||
end
|
||||
|
||||
local labeltext = "";
|
||||
if param.Combo then
|
||||
labeltext = "Combo";
|
||||
else
|
||||
labeltext = "Misses";
|
||||
end
|
||||
c.Label:settext( labeltext );
|
||||
c.Label:visible(false);
|
||||
|
||||
param.Zoom = scale( iCombo, 0, NumberMaxZoomAt, NumberMinZoom, NumberMaxZoom );
|
||||
param.Zoom = clamp( param.Zoom, NumberMinZoom, NumberMaxZoom );
|
||||
|
||||
c.Number:visible(true);
|
||||
c.Label:visible(true);
|
||||
c.Number:settext( string.format("%i", iCombo) );
|
||||
-- FullCombo Rewards
|
||||
if param.FullComboW1 then
|
||||
c.Number:diffuse(color("#00aeef"));
|
||||
c.Number:glowshift();
|
||||
elseif param.FullComboW2 then
|
||||
c.Number:diffuse(color("#fff568"));
|
||||
c.Number:glowshift();
|
||||
elseif param.FullComboW3 then
|
||||
c.Number:diffuse(color("#a4ff00"));
|
||||
c.Number:stopeffect();
|
||||
else
|
||||
c.Number:diffuse(color("#ffffff"));
|
||||
c.Number:stopeffect();
|
||||
end
|
||||
-- Pulse
|
||||
Pulse( c.Number, param );
|
||||
-- Pulse( c.Label, param );
|
||||
--[[ -- Milestone Logic
|
||||
if (iCombo % 100) == 0 then
|
||||
c.OneHundredMilestone:playcommand("Milestone");
|
||||
elseif (iCombo % 250) == 0 then
|
||||
-- It should really be 1000 but thats slightly unattainable, since
|
||||
-- combo doesnt save over now.
|
||||
c.OneThousandMilestone:playcommand("Milestone");
|
||||
else
|
||||
return
|
||||
end; --]]
|
||||
end;
|
||||
ScoreChangedMessageCommand=function(self,param)
|
||||
local iToastyCombo = param.ToastyCombo;
|
||||
if iToastyCombo and (iToastyCombo > 0) then
|
||||
-- (cmd(thump;effectmagnitude,1,1.2,1;effectclock,'beat'))(c.Number)
|
||||
-- (cmd(thump;effectmagnitude,1,1.2,1;effectclock,'beat'))(c.Number)
|
||||
else
|
||||
-- c.Number:stopeffect();
|
||||
end;
|
||||
end;
|
||||
};
|
||||
|
||||
return t;
|
||||
Reference in New Issue
Block a user