0

I know this is very outdated. But I want know how to use flashpunk Motion class (Motion, linearMotion, CircularMotion, etc.) and how apply it to entity. I have searched anywhere, but it seems noone write about it.

Thank you.

hamdirizal
  • 221
  • 1
  • 8

1 Answers1

1

Here is an example for using the CircularMotion:

// Create a new Circular Motion
var motion :CircularMotion = new CircularMotion();

// Set the motion properties
motion.setMotion(100, // centerX
        100, //centerY
        50, //angle
        90, //start angle
        true, //is motion clockwise
        20); //motion duration

// The object we would like to tween            
motion.object = this; 

// Begin the motion
addTween(motion, true);
Galman33
  • 154
  • 3