Fixed the issue related to trigging holdheads before they reach the receptor, at least I think that, more tests to be done (issue 150)

This commit is contained in:
Alberto Ramos
2010-07-18 18:54:37 -06:00
parent 7ae0b82816
commit daa32fc3f8
11 changed files with 119 additions and 54 deletions
+26 -16
View File
@@ -1,39 +1,49 @@
local function Beat(self)
local this = self:GetChildren()
--Yes, why not?
this.Base:pause();
this.Glow:pause();
this.Tap:pause();
this.Base:setstate(0);
this.Glow:setstate(1);
this.Tap:setstate(2);
this.Glow:blend('BlendMode_Add');
this.Glow:diffusealpha(0);
local beat = GAMESTATE:GetSongBeat()
local part = beat%1
part = clamp(part,0,0.5)
local eff = scale(part,0,0.5,1,0)
if beat >= 0 then
this.Glow:diffusealpha(eff);
if (GAMESTATE:GetSongDelay() or false) and part == 0 then eff = 0 end
if beat < 0 then
eff = 0
end
this.Glow:diffusealpha(eff);
end
return Def.ActorFrame {
-- COMMANDS --
InitCommand=cmd(SetUpdateFunction,Beat);
-- LAYERS --
NOTESKIN:LoadActor("Center", "Outline Receptor")..{
Name="Outline";
Condition=Var "Button" == "Center";
--InitCommand=cmd(x,96);
};
NOTESKIN:LoadActor(Var "Button", "Ready Receptor")..{
Name="Base";
InitCommand=cmd();
Frames = { { Frame = 0 } };
--PressCommand=cmd(finishtweening;glow,1,1,1,1;linear,0.1;glow,1,1,1,0);
};
NOTESKIN:LoadActor(Var "Button", "Ready Receptor")..{
Name="Glow";
InitCommand=cmd();
Frames = { { Frame = 1 } };
InitCommand=cmd(blend,'BlendMode_Add');
--PressCommand=cmd(finishtweening;linear,0.05;zoom,0.9;linear,0.1;zoom,1);
};
--[[
NOTESKIN:LoadActor(Var "Button", "Ready Receptor")..{
Name="Tap";
InitCommand=NOTESKIN:GetMetricA(Var "Button" ,"ReceptorTapInitCommand");
PressCommand=NOTESKIN:GetMetricA(Var "Button" ,"ReceptorTapPressCommand");
Frames = { { Frame = 2 } };
InitCommand=cmd(zoom,1;diffusealpha,0;glow,1,1,1,0);
--NOTESKIN:GetMetricA(Var "Button", "TapInitCommand");
--
PressCommand=cmd(finishtweening;glow,1,1,1,1;zoom,1;linear,0.2;glow,1,1,1,0;zoom,1.2);
--NOTESKIN:GetMetricA(Var "Button", "TapHeldCommand");
--
};
--]]
}