Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- for ( var i:int = 0;i<levelDesign.platformHolder.numChildren; i++)
- {
- //current platform
- var hitplatform:DisplayObject = levelDesign.platformHolder.getChildAt(i);
- //checking hit test
- if (FireHero.hitTestObject(hitplatform) && FireHero.y < hitplatform.y)
- {
- FireOnGround = true;
- if (FireHero.hitTestObject(hitplatform) && FireHero.x == hitplatform.x + hitplatform.width)
- {
- FireLeftBarrier = true;
- FireHero.x = FireHero.x + 1;
- }
- if (FireHero.hitTestObject(hitplatform) && FireHero.x == hitplatform.x)
- {
- FireRightBarrier = true;
- }
- break;
- }
- FireOnGround = false;
- FireLeftBarrier = false;
- FireRightBarrier = false;
- }
- if (!FireOnGround)
- {
- FireJumping = true;
- }
Advertisement
Add Comment
Please, Sign In to add comment