示例#1
0
        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);
            }
        }
示例#2
0
 public void removeChild(ChaosObject child)
 {
     childs.Remove(child);
 }
示例#3
0
 public void addChild(ChaosObject child)
 {
     childs.Add(child);
 }
示例#4
0
 public static bool HasObject(ChaosObject obj)
 {
     return(world.IndexOf(obj) != -1);
 }