public void setParent(ChaosObject parent) { if (destroyed) { throw new Exception("You're trying to access destroyed object."); } if (ChaosPhysics.HasObject(parent)) { if (this.parent != null) { this.parent.removeChild(this); } this.parent = parent; this.parent.addChild(this); } }
public void removeChild(ChaosObject child) { childs.Remove(child); }
public void addChild(ChaosObject child) { childs.Add(child); }
public static bool HasObject(ChaosObject obj) { return(world.IndexOf(obj) != -1); }