if IsiOS() then
FadeIn()
SetCameraPosition(850,550)
SetCameraZoom(6000)
WaitReal(2)
Message("01_SEND_SEED", true, 1.0, "Centre")
WaitMessage(true)
FadeOut() --- READY FOR NEXT MESSAGE TO FADE IN
else
MessageBox("01_01")
WaitDialog()
end
function FadeIn()
for i = 1,255 do
SetVignetteAlpha(i)
end
end
function FadeOut()
for i = 255,1 do
SetVignetteAlpha(i)
end
end
-- set backdrop and vignette
bw = math.random(0,1)
SetBackdropColour(bw*210,bw*227,bw*224)
SetVignetteAlpha(0)
if bw == 1 then
SetVignetteAlpha(255)
bw = 255
end
if GetGameTime() < 10 then
Globals.Structures.RootSpeed=15
if GetGameTime() > 1 then
if bw > 50 then
bw = bw - 1
SetVignetteAlpha(bw)
end
end
-- set backdrop and vignette
bw = math.random(0,1)
SetBackdropColour(bw*210,bw*227,bw*224)
SetVignetteAlpha(0)
if bw == 1 then
SetVignetteAlpha(255)
bw = 255
end
if GetGameTime() < 10 then
Globals.Structures.RootSpeed=15
if GetGameTime() > 1 then
if bw > 50 then
bw = bw - 1
SetVignetteAlpha(bw)
end
end
--To be placed inside LevelSetup
-- set vignette alpha
-- starts on 255 (fully opaque)
vig=255
-- set the initial vignette
SetVignetteAlpha(vig)
--To be placed inside a While GameRunning() loop inside LevelLogic
-- set vignette alpha
-- if the fade is not yet complete...
if vig > 0 then
-- fade out one more step..
vig = vig - 1
-- set the vignette to the value of vig
SetVignetteAlpha(vig)
end
if IsiOS() then -- This asteroid
FadeIn()
WaitReal(0)
Message("This Unknown Asteroid...", true, 1.0, "Right")
WaitMessage(true)
FadeOut()
else
MessageBox("01_01")
WaitDialog()
end
function FadeIn()
for imageview = 100,0 do
ImageBox("res/Transition-(imageview).png",512, "Transition-(imageview)")
end
function FadeOut()
for imageview = 0,100 do
ImageBox("res/Transition-(imageview).png",512, "Transition-(imageview)")
end
DrawSprite(1, 0,0, 255,255,255,1, 1000)