屏幕尺寸相关代码整理,修复部分背景显示不正确
This commit is contained in:
@@ -54,23 +54,23 @@ local swap={
|
||||
fade={30,15,function(t)
|
||||
local t=t>15 and 2-t/15 or t/15
|
||||
gc.setColor(0,0,0,t)
|
||||
gc.rectangle("fill",0,0,scr.W,scr.H)
|
||||
gc.rectangle("fill",0,0,scr.w,scr.h)
|
||||
end},
|
||||
fade_togame={120,20,function(t)
|
||||
local t=t>20 and(120-t)/100 or t/20
|
||||
gc.setColor(0,0,0,t)
|
||||
gc.rectangle("fill",0,0,scr.W,scr.H)
|
||||
gc.rectangle("fill",0,0,scr.w,scr.h)
|
||||
end},
|
||||
slowFade={180,90,function(t)
|
||||
local t=t>90 and 2-t/90 or t/90
|
||||
gc.setColor(0,0,0,t)
|
||||
gc.rectangle("fill",0,0,scr.W,scr.H)
|
||||
gc.rectangle("fill",0,0,scr.w,scr.h)
|
||||
end},
|
||||
swipe={30,15,function(t)
|
||||
t=t/30
|
||||
gc.setColor(.1,.1,.1,1-abs(t-.5))
|
||||
t=t*t*(3-2*t)*2-1
|
||||
gc.rectangle("fill",t*scr.W,0,scr.W,scr.H)
|
||||
gc.rectangle("fill",t*scr.w,0,scr.w,scr.h)
|
||||
end},
|
||||
}--Scene swapping animations
|
||||
function SCN.swapTo(tar,style)--Parallel scene swapping, cannot back
|
||||
|
||||
Reference in New Issue
Block a user