set effectclock cleanly
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
local Color = color(Var "Color1");
|
||||
local children = {
|
||||
LoadActor(Var "File1") .. {
|
||||
OnCommand=cmd(x,SCREEN_CENTER_X;y,SCREEN_CENTER_Y;diffuse,Color);
|
||||
OnCommand=cmd(x,SCREEN_CENTER_X;y,SCREEN_CENTER_Y;diffuse,Color;effectclock,"music");
|
||||
GainFocusCommand=cmd(play);
|
||||
LoseFocusCommand=cmd(pause);
|
||||
};
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
local Color = color(Var "Color1");
|
||||
|
||||
local a = LoadActor(Var "File1") .. {
|
||||
OnCommand=cmd(zoomtowidth,SCREEN_WIDTH/2;zoomtoheight,SCREEN_HEIGHT/2;diffuse,Color);
|
||||
OnCommand=cmd(zoomtowidth,SCREEN_WIDTH/2;zoomtoheight,SCREEN_HEIGHT/2;diffuse,Color;effectclock,"music");
|
||||
GainFocusCommand=cmd(play);
|
||||
LoseFocusCommand=cmd(pause);
|
||||
};
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
local Color = color(Var "Color1");
|
||||
local a = LoadActor(Var "File2") .. {
|
||||
OnCommand=cmd(zoomtowidth,SCREEN_WIDTH/2;zoomtoheight,SCREEN_HEIGHT/2;diffuse,Color);
|
||||
OnCommand=cmd(zoomtowidth,SCREEN_WIDTH/2;zoomtoheight,SCREEN_HEIGHT/2;diffuse,Color;effectclock,"music");
|
||||
GainFocusCommand=cmd(play);
|
||||
LoseFocusCommand=cmd(pause);
|
||||
};
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
local Color = color(Var "Color1");
|
||||
|
||||
local a = LoadActor(Var "File1") .. {
|
||||
OnCommand=cmd(zoomtowidth,SCREEN_WIDTH/2;zoomtoheight,SCREEN_HEIGHT/2;diffuse,Color;zoomx,self:GetZoomX()*-1;zoomy,self:GetZoomY()*-1);
|
||||
OnCommand=cmd(zoomtowidth,SCREEN_WIDTH/2;zoomtoheight,SCREEN_HEIGHT/2;diffuse,Color;zoomx,self:GetZoomX()*-1;zoomy,self:GetZoomY()*-1;effectclock,"music");
|
||||
GainFocusCommand=cmd(play);
|
||||
LoseFocusCommand=cmd(pause);
|
||||
};
|
||||
|
||||
@@ -3,11 +3,11 @@ local Color2 = color(Var "Color2");
|
||||
|
||||
local children = {
|
||||
Def.Sprite {
|
||||
OnCommand=cmd(x,SCREEN_CENTER_X;y,SCREEN_CENTER_Y;ZoomToWidth,SCREEN_WIDTH;ZoomToHeight,SCREEN_HEIGHT;diffuse,Color1);
|
||||
OnCommand=cmd(x,SCREEN_CENTER_X;y,SCREEN_CENTER_Y;ZoomToWidth,SCREEN_WIDTH;ZoomToHeight,SCREEN_HEIGHT;diffuse,Color1;effectclock,"music");
|
||||
};
|
||||
|
||||
LoadActor(Var "File1") .. {
|
||||
OnCommand=cmd(blend,"BlendMode_Add";x,SCREEN_CENTER_X;y,SCREEN_CENTER_Y;ZoomToWidth,SCREEN_WIDTH;ZoomToHeight,SCREEN_HEIGHT;diffuse,Color2);
|
||||
OnCommand=cmd(blend,"BlendMode_Add";x,SCREEN_CENTER_X;y,SCREEN_CENTER_Y;ZoomToWidth,SCREEN_WIDTH;ZoomToHeight,SCREEN_HEIGHT;diffuse,Color2;effectclock,"music");
|
||||
GainFocusCommand=cmd(play);
|
||||
LoseFocusCommand=cmd(pause);
|
||||
};
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
local Color = color(Var "Color1");
|
||||
local children = {
|
||||
LoadActor(Var "File1") .. {
|
||||
OnCommand=cmd(scale_or_crop_background;diffuse,Color;loop,false);
|
||||
OnCommand=cmd(scale_or_crop_background;diffuse,Color;loop,false;effectclock,"music");
|
||||
GainFocusCommand=cmd(play);
|
||||
LoseFocusCommand=cmd(pause);
|
||||
};
|
||||
|
||||
@@ -2,7 +2,7 @@ local Color = color(Var "Color1");
|
||||
|
||||
local children = {
|
||||
LoadActor(Var "File1") .. {
|
||||
OnCommand=cmd(scale_or_crop_background;diffuse,Color);
|
||||
OnCommand=cmd(scale_or_crop_background;diffuse,Color;effectclock,"music");
|
||||
GainFocusCommand=cmd(play);
|
||||
LoseFocusCommand=cmd(pause);
|
||||
};
|
||||
|
||||
@@ -3,7 +3,7 @@ local Color = color(Var "Color1");
|
||||
|
||||
local children = {
|
||||
LoadActor(Var "File1") .. {
|
||||
OnCommand=cmd(horizalign,left;scaletocover,0,0,SCREEN_WIDTH,SCREEN_HEIGHT;diffuse,color(Color));
|
||||
OnCommand=cmd(horizalign,left;scaletocover,0,0,SCREEN_WIDTH,SCREEN_HEIGHT;diffuse,color(Color);effectclock,"music");
|
||||
GainFocusCommand=cmd(play);
|
||||
LoseFocusCommand=cmd(pause);
|
||||
};
|
||||
|
||||
@@ -2,7 +2,7 @@ local Color = color(Var "Color1");
|
||||
|
||||
local children = {
|
||||
LoadActor(Var "File1") .. {
|
||||
OnCommand=cmd(scale_or_crop_background;diffuse,Color;pause);
|
||||
OnCommand=cmd(scale_or_crop_background;diffuse,Color;pause;effectclock,"music");
|
||||
GainFocusCommand=cmd(play);
|
||||
LoseFocusCommand=cmd(pause);
|
||||
};
|
||||
|
||||
@@ -2,7 +2,7 @@ local Color = color(Var "Color1");
|
||||
|
||||
local children = {
|
||||
LoadActor(Var "File1") .. {
|
||||
OnCommand=cmd(scale_or_crop_background;diffuse,Color;position,0);
|
||||
OnCommand=cmd(scale_or_crop_background;diffuse,Color;position,0;effectclock,"music");
|
||||
GainFocusCommand=cmd(play);
|
||||
LoseFocusCommand=cmd(pause);
|
||||
};
|
||||
|
||||
@@ -3,7 +3,7 @@ local Color = color(Var "Color1");
|
||||
|
||||
local children = {
|
||||
LoadActor(Var "File1") .. {
|
||||
OnCommand=cmd(diffuse,Color);
|
||||
OnCommand=cmd(diffuse,Color;effectclock,"music");
|
||||
GainFocusCommand=cmd(play);
|
||||
LoseFocusCommand=cmd(pause);
|
||||
};
|
||||
|
||||
@@ -670,21 +670,6 @@ void BackgroundImpl::LoadFromSong( const Song* pSong )
|
||||
m_pDancingCharacters->LoadNextSong();
|
||||
|
||||
TEXTUREMAN->SetDefaultTexturePolicy( OldPolicy );
|
||||
|
||||
/* Song backgrounds always sync from the music by default, unlike other actors
|
||||
* which sync from the regular clock by default. If you don't want this, set
|
||||
* the clock back with "effectclock,timer" in your OnCommand. Note that at this
|
||||
* point, we havn't run the OnCommand yet, so it'll override correctly. */
|
||||
FOREACHM( BackgroundDef, Actor*, mainlayer.m_BGAnimations, it )
|
||||
{
|
||||
Actor *pBGA = it->second;
|
||||
|
||||
/* Be sure that we run this command recursively on all children; the tree
|
||||
* may look something like "BGAnimation, BGAnimationLayer, Sprite" or it
|
||||
* may be deeper, like "BGAnimation, BGAnimationLayer, BGAnimation,
|
||||
* BGAnimationLayer, Sprite". */
|
||||
pBGA->RunCommands( ActorUtil::ParseActorCommands("effectclock,'music'") );
|
||||
}
|
||||
}
|
||||
|
||||
int BackgroundImpl::Layer::FindBGSegmentForBeat( float fBeat ) const
|
||||
|
||||
Reference in New Issue
Block a user