Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/lua/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Lua 正在进行转换时不更新值 燃油表箭头:旋转(75) 局部燃油下降角=150/FuelevelMax 本地功能BurnFuel(事件) --转换到(FuelGaugerRow,{旋转=FuelGaugerRow.rotation-FuelDecreaseAngle}) FuelGaugerRow.rotation=FuelGaugerRow.rotation-燃油递减角度 燃油液位=燃油液位-1 如果FuelLevel_Lua_Coronasdk - Fatal编程技术网

Lua 正在进行转换时不更新值 燃油表箭头:旋转(75) 局部燃油下降角=150/FuelevelMax 本地功能BurnFuel(事件) --转换到(FuelGaugerRow,{旋转=FuelGaugerRow.rotation-FuelDecreaseAngle}) FuelGaugerRow.rotation=FuelGaugerRow.rotation-燃油递减角度 燃油液位=燃油液位-1 如果FuelLevel

Lua 正在进行转换时不更新值 燃油表箭头:旋转(75) 局部燃油下降角=150/FuelevelMax 本地功能BurnFuel(事件) --转换到(FuelGaugerRow,{旋转=FuelGaugerRow.rotation-FuelDecreaseAngle}) FuelGaugerRow.rotation=FuelGaugerRow.rotation-燃油递减角度 燃油液位=燃油液位-1 如果FuelLevel,lua,coronasdk,Lua,Coronasdk,,则必须在开始新操作之前取消上一次转换,或者等到上一次转换结束后再开始新操作。to()返回对可暂停的转换对象的引用。例如 local function ScrollExtras(event) if FuelGaugeArrow.rotation + FuelIncreaseAngle <= 75 then FuelGaugeArrow.rotation = FuelGaugeArrow.rotation + FuelIncreaseAngle else

,则必须在开始新操作之前取消上一次转换,或者等到上一次转换结束后再开始新操作。to()返回对可暂停的转换对象的引用。例如

local function ScrollExtras(event)
   if FuelGaugeArrow.rotation + FuelIncreaseAngle <= 75 then 
      FuelGaugeArrow.rotation = FuelGaugeArrow.rotation + FuelIncreaseAngle
   else
      FuelGaugeArrow.rotation = 75
   end
end
Runtime:addEventListener( "enterFrame", ScrollExtras )

第二种方法(等待第一次完成)可能不是您想要的,另外它还涉及到为侦听器设置onComplete参数,但是如果您愿意,可以在中进行解释。

@Bompaization好听。您可以接受答案,以便关闭它。
local function ScrollExtras(event)
   if FuelGaugeArrow.rotation + FuelIncreaseAngle <= 75 then 
      FuelGaugeArrow.rotation = FuelGaugeArrow.rotation + FuelIncreaseAngle
   else
      FuelGaugeArrow.rotation = 75
   end
end
Runtime:addEventListener( "enterFrame", ScrollExtras )
local fuelTrans

local function BurnFuel(event)
    if fuelTrans ~= nil then 
        fuelTrans.cancel()
        fuelTrans = transition.to( FuelGaugeArrow, ... )
    end
    ...
end