-
Notifications
You must be signed in to change notification settings - Fork 136
/
Copy pathVisualization2FileFlash.lua
46 lines (42 loc) · 1.37 KB
/
Visualization2FileFlash.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
local Color1 = color(Var "Color1")
local Color2 = color(Var "Color2")
local t = Def.ActorFrame {}
t[#t + 1] =
LoadActor(Var "File1") ..
{
OnCommand = function(self)
self:x(SCREEN_CENTER_X):y(SCREEN_CENTER_Y):scale_or_crop_background():diffuse(Color1):effectclock("music")
-- Explanation in StretchNoLoop.lua.
if self.GetTexture then
self:GetTexture():rate(self:GetParent():GetUpdateRate())
end
end,
GainFocusCommand = function(self)
self:play()
end,
LoseFocusCommand = function(self)
self:pause()
end
}
if Var("File2") ~= nil then
t[#t + 1] =
LoadActor(Var("File2")) ..
{
OnCommand = function(self)
self:blend("BlendMode_Add"):x(SCREEN_CENTER_X):y(SCREEN_CENTER_Y):scale_or_crop_background():diffuse(Color2):effectclock(
"music"
):linear(1):diffusealpha(0)
-- Explanation in StretchNoLoop.lua.
if self.GetTexture then
self:GetTexture():rate(self:GetParent():GetUpdateRate())
end
end,
GainFocusCommand = function(self)
self:play()
end,
LoseFocusCommand = function(self)
self:pause()
end
}
end
return t