Lua 科罗纳SDK。更长的按钮压力->;更强的效果(例如更高的跳跃)
我想不出在科罗纳实现它的任何方法。你有什么想法/建议吗?谢谢 在事件中定义并增加你的力量。阶段==开始。感谢修复pookzilla!Lua 科罗纳SDK。更长的按钮压力->;更强的效果(例如更高的跳跃),lua,coronasdk,Lua,Coronasdk,我想不出在科罗纳实现它的任何方法。你有什么想法/建议吗?谢谢 在事件中定义并增加你的力量。阶段==开始。感谢修复pookzilla! local timeOfPressing = 9999999; local buttonPressed = false; local function keyListener( event ) if event.phase == "began" then timeOfPressing = event.time; button
local timeOfPressing = 9999999;
local buttonPressed = false;
local function keyListener( event )
if event.phase == "began" then
timeOfPressing = event.time;
buttonPressed = true;
elseif event.phase == "ended" and buttonPressed then
local force = event.time - timeOfPressing;
if force > maximumForce then force = maximumForce end
buttonPressed = false;
myJumpFunction(force);
end
end