【问题标题】:How to move backgrounds in Corona SDK?如何在 Corona SDK 中移动背景?
【发布时间】:2014-06-16 12:57:30
【问题描述】:

我需要任何关于如何在背景中移动的想法。我有很大的背景,我需要为此行动。

例子:

我有:

background = display.newImage ("background.png") 
function -- ( for touch )
   --here need how move around the background.
end

【问题讨论】:

    标签: image background sdk lua coronasdk


    【解决方案1】:

    您可以从文档中了解如何移动图像,请在此处查看示例代码:

    http://docs.coronalabs.com/api/library/display/newImage.html

    【讨论】:

      【解决方案2】:

      看看transition 类。

      例子:

      local image = display.newImage("your_image_here.png")
      image.x, image.y = some_position_x, some_position_y
      transition.moveBy(image, {x=300, time=1000})
      

      【讨论】:

      • 感谢朋友,我可以向左移动图像。现在只需要在所有 x / y 坐标中移动即可在所有背景中移动
      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2016-02-12
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-07-14
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多