Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function checkColisions()
- {
- player.controlGravity = true;
- for each (platform in PlatformList)
- {
- //If the player is toutching the platform and if their 'y' is the same (toutching with feet on platform)
- if (platform.hitTestObject(player) && player.y==platform.y)
- {
- player.toutchingGround = true;
- player.controlGravity = false;
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement