OkToAddChild() публичный Метод

public OkToAddChild ( MovableObject ob, IntVector3 dstLoc ) : bool
ob MovableObject
dstLoc IntVector3
Результат bool
Пример #1
0
        public bool MoveTo(ContainerObject dst, IntVector3 dstLoc = new IntVector3())
        {
            Debug.Assert(this.World.IsWritable);

            if (!OkToMove())
            {
                return(false);
            }

            if (this.Container == dst && this.Location == dstLoc)
            {
                return(true);
            }

            if (dst != null && !dst.OkToAddChild(this, dstLoc))
            {
                return(false);
            }

            if (dst != this.Container)
            {
                MoveToLow(dst, dstLoc);
            }
            else
            {
                MoveToLow(dstLoc);
            }

            return(true);
        }
Пример #2
0
        public bool MoveTo(ContainerObject dst, IntVector3 dstLoc = new IntVector3())
        {
            Debug.Assert(this.World.IsWritable);

            if (!OkToMove())
                return false;

            if (this.Container == dst && this.Location == dstLoc)
                return true;

            if (dst != null && !dst.OkToAddChild(this, dstLoc))
                return false;

            if (dst != this.Container)
                MoveToLow(dst, dstLoc);
            else
                MoveToLow(dstLoc);

            return true;
        }