deltaluca

Untitled

Apr 16th, 2012
43
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import nape.hacks.ForcedSleep;
  2.  
  3. -----------------------
  4. implemented, require the objects to already be in a Space
  5.  
  6. //force body to go to sleep
  7. ForcedSleep.sleepBody(body:Body, ?zeroVelocities:Bool=true)
  8.  
  9. //force constraint to go to sleep
  10. ForcedSleep.sleepConstraint(constraint:Constraint)
  11.  
  12. //force this body, and every body + constraint connected via constraints to go to sleep
  13. ForcedSleep.sleepConnected(body:Body, ?zeroVelocities:Bool=true)
  14.  
  15. -----------------------
  16. still to be implemented, shortcuts for adding + sleeping (so more performant)
  17.  
  18. ForcedSleep.addAndSleepBody(body:Body, space:Space)
  19. ForcedSleep.addAndSleepConstraint(constraint:Constraint, space:Space)
  20. ForcedSleep.addAndSleepCompound(compound:Compound, space:Space)
Advertisement
Add Comment
Please, Sign In to add comment