Advertisement
Guest User

Untitled

a guest
Jul 21st, 2017
46
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function checkColisions()
  2.             {
  3.                 player.controlGravity = true;
  4.                
  5.                
  6.                 for each (platform in PlatformList)
  7.                 {
  8.                            
  9.                         //If the player is toutching the platform and if their 'y' is the same (toutching with feet on platform)
  10.                         if (platform.hitTestObject(player) && player.y==platform.y)
  11.                         {
  12.                             player.toutchingGround = true;
  13.                             player.controlGravity = false;
  14.                             }
  15.                    
  16.                        
  17.                     }
  18.            
  19.        
  20.                 }
  21.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement