spaceship.script 433 B

123456789
  1. function init(self)
  2. local to = vmath.vector3(400, 400, 0) -- <1>
  3. go.animate(".", "position", go.PLAYBACK_LOOP_PINGPONG, to, go.EASING_INOUTSINE, 2) -- <2>
  4. end
  5. --[[
  6. 1. The destination to move the game object to (x, y, z)
  7. 2. This function animates the game object position to the destination and back again repeatedly over a period of 2 seconds. The movement uses a sine-wave easing curve to slow down at the end points.
  8. --]]