加载动画交互优化
This commit is contained in:
@@ -6,7 +6,7 @@ local scene={}
|
|||||||
|
|
||||||
local blackTime,openTime
|
local blackTime,openTime
|
||||||
local shadePhase1,shadePhase2
|
local shadePhase1,shadePhase2
|
||||||
local progress=-1
|
local progress=0
|
||||||
local studioLogo--Studio logo text object
|
local studioLogo--Studio logo text object
|
||||||
local logoColor1,logoColor2
|
local logoColor1,logoColor2
|
||||||
local skip
|
local skip
|
||||||
@@ -16,18 +16,23 @@ local light={}
|
|||||||
for i=0,26 do
|
for i=0,26 do
|
||||||
table.insert(light,1050+60*int(i/9))
|
table.insert(light,1050+60*int(i/9))
|
||||||
table.insert(light,660-i%9*60)
|
table.insert(light,660-i%9*60)
|
||||||
table.insert(light,math.random()<.26)
|
table.insert(light,false)
|
||||||
end
|
end
|
||||||
light[2*3],light[6*3],light[26*3],light[27*3]=false,false,true,false
|
light[math.random(10,18)*3]=true
|
||||||
|
light[math.random(19,25)*3]=true
|
||||||
|
light[26*3]=true
|
||||||
|
|
||||||
local function upFloor()
|
local function upFloor()
|
||||||
progress=progress+1
|
progress=progress+1
|
||||||
|
if light[3*progress+3]then
|
||||||
light[3*progress+3]=false
|
light[3*progress+3]=false
|
||||||
|
SFX.play("click",.3)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
local loadingThread=coroutine.create(function()
|
local loadingThread=coroutine.create(function()
|
||||||
for _=1,VOC.getCount()do
|
for i=1,SFX.getCount()do
|
||||||
VOC.loadOne()
|
SFX.loadOne()
|
||||||
if _%3==0 then YIELD()end
|
if i%2==0 then YIELD()end
|
||||||
end
|
end
|
||||||
|
|
||||||
upFloor()
|
upFloor()
|
||||||
@@ -36,12 +41,6 @@ local loadingThread=coroutine.create(function()
|
|||||||
if i%2==0 then YIELD()end
|
if i%2==0 then YIELD()end
|
||||||
end
|
end
|
||||||
|
|
||||||
upFloor()
|
|
||||||
for i=1,SFX.getCount()do
|
|
||||||
SFX.loadOne()
|
|
||||||
if i%2==0 then YIELD()end
|
|
||||||
end
|
|
||||||
|
|
||||||
upFloor()
|
upFloor()
|
||||||
for i=1,IMG.getCount()do
|
for i=1,IMG.getCount()do
|
||||||
IMG.loadOne()
|
IMG.loadOne()
|
||||||
@@ -51,7 +50,13 @@ local loadingThread=coroutine.create(function()
|
|||||||
upFloor()
|
upFloor()
|
||||||
for i=1,SKIN.getCount()do
|
for i=1,SKIN.getCount()do
|
||||||
SKIN.loadOne()
|
SKIN.loadOne()
|
||||||
if i%2==0 then YIELD()end
|
if i%3==0 then YIELD()end
|
||||||
|
end
|
||||||
|
|
||||||
|
upFloor()
|
||||||
|
for _=1,VOC.getCount()do
|
||||||
|
VOC.loadOne()
|
||||||
|
if _%3==0 then YIELD()end
|
||||||
end
|
end
|
||||||
|
|
||||||
upFloor()
|
upFloor()
|
||||||
@@ -158,6 +163,7 @@ function scene.keyDown(key)
|
|||||||
light[3*key]=not light[3*key]
|
light[3*key]=not light[3*key]
|
||||||
if light[6]and light[18]then
|
if light[6]and light[18]then
|
||||||
locked=false
|
locked=false
|
||||||
|
skip=0
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
skip=skip+1
|
skip=skip+1
|
||||||
|
|||||||
Reference in New Issue
Block a user