コード例 #1
0
 public void OnDisable()
 {
     if (!_isKinematic)
     {
         space._Remove(this);
     }
     ChipmunkInterpolationManager._Register(this);
     space = null;
 }
コード例 #2
0
 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);
     }
 }
コード例 #3
0
 protected void OnEnable()
 {
     // add to space:
     space = Chipmunk.manager._space;
     if (!_isKinematic)
     {
         space._Add(this);
     }
     ChipmunkInterpolationManager._Register(this);
 }
コード例 #4
0
 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);
     }
 }