【问题标题】:How to add Scrolling Background Effect in iOS SpriteKit.如何在 iOS SpriteKit 中添加滚动背景效果。
【发布时间】:2013-09-28 05:32:00
【问题描述】:

我想为我的场景添加滚动背景效果。例如,当用户手势在右侧或左侧时,背景应水平滚动,如果向上或向下,则背景应垂直滚动以添加角色真正移动的效果。

提前致谢。

【问题讨论】:

    标签: iphone ios ios7 sprite-kit


    【解决方案1】:

    查看 Apple 为 SpriteKit 解释的 Adventure 游戏代码。与您的问题有关的部分是“移动相机”。本质上,它是将节点添加到“世界”节点,然后根据用户输入或角色移动移动“世界”节点。

    https://developer.apple.com/library/ios/documentation/GraphicsAnimation/Conceptual/CodeExplainedAdventure/AdventureArchitecture/AdventureArchitecture.html#//apple_ref/doc/uid/TP40013140

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2014-06-02
      • 1970-01-01
      • 2015-11-01
      • 2019-06-23
      • 1970-01-01
      • 2016-08-11
      • 1970-01-01
      相关资源
      最近更新 更多