Gravity is far simpler than it appears in AS3. However you have to understand a few key points:
- As the object moves up on the stage, the Y coordinate decreases.
- Therefore, if the y coordinate increases, it will be moving down.
With this in mind we first need to declare a few variables.
Now for our code:
No comments:
Post a Comment