我试图在GameSalad中向左移动一个对象100px。为此,我的做法如下:
Behaviour : Move To
Position X : sprite.x = sprite.x - 100
Position Y : sprite.y
Relative to : scene
Speed : 200
Run to completion is not selected.
问题:这在我的mac上工作得很好,但精灵在我的iPod touch上不动。我已经使用了事件触摸按下和释放。没有使用任何鼠标指针行为。
注意:我不需要使用Interpolate行为
你不应该在你的"move to:"字段中使用self.position.X和self.position.Y。
在actor中创建一个新的Real,命名为'startingX'
演员的第一件事:
更改属性self。startingX 到 self.position.X
然后在Move To行为中使用startingX:
移动到:startingX - 100, self.position.Y