Advertisement
CaptainLepidus

Platform Engine

Feb 16th, 2012
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. {
  2.     if ( place_meeting( x , y + 1 , objBlock ) == false )
  3.     {
  4.         grav = grav + 0.1;
  5.         if ( grav > 5 )
  6.         {
  7.             grav = 5;
  8.         }
  9.         vsp = vsp + grav;
  10.     }
  11.     else
  12.     {
  13.         grav = 0;
  14.         vsp = 0;
  15.     }
  16.     hsp = keyboard_check( vk_right ) * 4 - keyboard_check( vk_left ) * 4;
  17.     move_contact_all( point_direction( x , y , x + hsp , y ) , abs( hsp ) );
  18.     move_contact_all( point_direction( x , y , x , y + vsp ) , abs( vsp ) );
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement