- if (Key.isDown(Key.UP) && !jumping) {
- jumping = true;
- }
- if (jumping) {
- this.gotoAndStop("jump");
- this._y -= jump;
- jump -= .5;
- if (jump<0) {
- falling = true;
- }
- if (jump<-15) {
- jump = -15;
- }
- }
Plat forms are simply hit tests that tell it not to fall anymore and then the hero is always falling if its not jumping or on platform the code is constantly checking to make sure if it is

No comments:
Post a Comment