Guest User

Untitled

a guest
Jan 17th, 2019
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. if(t.isCollosion(s))
  2. {
  3. t.falling = false;
  4. s.falling = false;
  5. }
  6.  
  7. if(!t.isCollosion(s))
  8. {
  9.  
  10. t.falling = true;
  11. s.falling = true;
  12. } //changing the falling value of a non static object does nothing
  13.  
  14. //////////////////////////////////////////////////////////////////////////////////////////////////////////
  15.  
  16. @Override
  17. public void update(float delta)
  18. {
  19.  
  20. if (falling) {
  21. y += gravity + delta / 1000;
  22. }
  23. super.update(delta);
  24. }
  25.  
  26. //this causes the player to go through some platforms and not others =(
Add Comment
Please, Sign In to add comment