transitions.luac.lua
来自「htc manila 2 sourcecode」· LUA 代码 · 共 139 行
LUA
139 行
-- Decompiled using luadec 0.4 by sztupy (http://winmo.sztupy.hu)
-- Command line was: -l ;;1,1,1;0,0,1,2,3,4,5,6,7,8,9,10,11,12,13 48226b98_manila.luac
require("transitiondelay")
animationtime = 0
easein = Interpolate_Linear
easeout = Interpolate_Linear
offscreenposition = 640
offscreenrotation = 180
offscreenzposition = 300
zoomnear = 1.25
zoomfar = 0.75
objs3D = {}
objs2D = {}
objsVis = {}
objs = {}
TransitionComplete = function(l_1_0)
if _config_os == "windowsmobile" then
transitionDelayStart(l_1_0)
end
end
setOffScreen = function()
for i_1,i_2 in pairs(objs3D) do
i_2.Position.x = offscreenposition
end
for i_1,i_2 in pairs(objs2D) do
i_2.Opacity.value = 0
end
for i_1,i_2 in pairs(objsVis) do
i_2.Opacity.value = 0
end
for i_1,i_2 in pairs(objs) do
i_2.Position.x = offscreenposition
end
end
Transition = function(l_3_0, l_3_1)
local l_3_2 = animationtime
local l_3_3 = 100
local l_3_4 = 100
local l_3_5 = 0
local l_3_6 = 0
local l_3_7 = 0
local l_3_8 = 0
local l_3_9 = 0
local l_3_10 = 0
local l_3_11 = 0
local l_3_12 = 0
local l_3_13 = 1
local l_3_14 = 1
if l_3_1 == "Out" then
ease = easeout
l_3_4 = 0
l_3_2 = 0
animationtime = 0
elseif l_3_1 == "In" then
ease = easein
l_3_3 = 0
animationtime = 0
end
if l_3_0 == NavigateDirection_Arbitrary or l_3_0 == "Arbitrary" then
trace("*** NavigateDirection_Arbitrary ***\n")
elseif l_3_0 == NavigateDirection_Left or l_3_0 == "Left" then
trace("*** NavigateDirection_Left ***\n")
if l_3_1 == "Out" then
l_3_6 = offscreenrotation
l_3_10 = -offscreenposition
l_3_12 = -20
elseif l_3_1 == "In" then
l_3_5 = offscreenrotation
l_3_9 = -offscreenposition
l_3_11 = -20
end
elseif l_3_0 == NavigateDirection_Right or l_3_0 == "Right" then
trace("*** NavigateDirection_Right ***\n")
if l_3_1 == "Out" then
l_3_6 = -offscreenrotation
l_3_10 = offscreenposition
l_3_12 = 20
elseif l_3_1 == "In" then
l_3_5 = -offscreenrotation
l_3_9 = offscreenposition
l_3_11 = 20
end
elseif l_3_0 == NavigateDirection_Front or l_3_0 == "Front" then
trace("*** NavigateDirection_Front ***\n")
animationtime = animationtime / 2
if l_3_1 == "Out" then
l_3_8 = offscreenzposition
l_3_14 = zoomnear
elseif l_3_1 == "In" then
l_3_7 = offscreenzposition
l_3_13 = zoomnear
end
elseif l_3_0 == NavigateDirection_Back or l_3_0 == "Back" then
trace("*** NavigateDirection_Back ***\n")
animationtime = animationtime / 2
if l_3_1 == "Out" then
l_3_8 = -offscreenzposition
l_3_14 = zoomfar
elseif l_3_1 == "In" then
l_3_7 = -offscreenzposition
l_3_13 = zoomfar
end
end
if objs3D then
for i_1,i_2 in pairs(objs3D) do
i_2.Opacity:Interpolate(l_3_3, l_3_4, animationtime, 0, ease, TransitionComplete, l_3_1)
i_2.Rotation:Interpolate(Vector3(i_2.Rotation.x, l_3_5, i_2.Rotation.z), Vector3(i_2.Rotation.x, l_3_6, i_2.Rotation.z), animationtime, 0, ease)
i_2.Position:Interpolate(Vector3(l_3_9, i_2.Position.y, l_3_7), Vector3(l_3_10, i_2.Position.y, l_3_8), animationtime, 0, ease)
end
end
if objs2D then
for i_1,i_2 in pairs(objs2D) do
i_2.Opacity.value = l_3_3
i_2.Opacity:Interpolate(l_3_4, animationtime, 0, ease)
i_2.Position:Interpolate(Vector3(l_3_11, 0, 0), Vector3(l_3_12, 0, 0), animationtime, 0, ease)
end
end
if objsVis then
for i_1,i_2 in pairs(objsVis) do
trace("obj: " .. i_2.InstanceName)
i_2.Opacity:Interpolate(l_3_4, animationtime, 0, ease)
end
end
if objs then
for i_1,i_2 in pairs(objs) do
i_2.Opacity.value = l_3_3
i_2.Opacity:Interpolate(l_3_4, animationtime, 0, Interpolate_Linear, TransitionComplete, l_3_1)
i_2.Position:Interpolate(Vector3(l_3_9, 0, 0), Vector3(l_3_10, 0, 0), animationtime, 0, Interpolate_Linear)
i_2.Scale:Interpolate(Vector3(l_3_13, l_3_13, 1), Vector3(l_3_14, l_3_14, 1), animationtime, 0, Interpolate_Linear)
end
end
end
trace("Loaded transitions.lua ")
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?