public void OnDisable() { if (!_isKinematic) { space._Remove(this); } ChipmunkInterpolationManager._Register(this); space = null; }
public static void ChipmunkBodyDestroy(ChipmunkBody b) { if (b != null) { b.enabled = false; // registering a disable body will remove it from the list ChipmunkInterpolationManager._Register(b); } }
protected void OnEnable() { // add to space: space = Chipmunk.manager._space; if (!_isKinematic) { space._Add(this); } ChipmunkInterpolationManager._Register(this); }
public static void ChipmunkBodyDestroy(ChipmunkBody b, ChipmunkShape s) { if (s != null) { s.enabled = false; // makes the shape to be removed from the space } if (b != null) { b.enabled = false; // registering a disable body will remove it from the list ChipmunkInterpolationManager._Register(b); } }