Pathfinding.QuadtreeNode.SetPosition C# (CSharp) Method

SetPosition() public method

public SetPosition ( Int3 value ) : void
value Int3
return void
		public void SetPosition (Int3 value) {
			position = value;
		}
		

Usage Example

Ejemplo n.º 1
0
        public void CreateNodeRec(QuadtreeNodeHolder holder, int depth, int x, int y)
        {
            int num2;
            int width = ((int)1) << (Math.Min(this.editorHeightLog2, this.editorWidthLog2) - depth);

            if (depth < this.minDepth)
            {
                num2 = -1;
            }
            else
            {
                num2 = this.CheckNode(x, y, width);
            }
            if (((num2 == 1) || (num2 == 0)) || (width == 1))
            {
                QuadtreeNode node = new QuadtreeNode(base.active);
                node.SetPosition((VInt3)this.LocalToWorldPosition(x, y, width));
                node.Walkable = num2 == 1;
                holder.node   = node;
            }
            else
            {
                holder.c0 = new QuadtreeNodeHolder();
                holder.c1 = new QuadtreeNodeHolder();
                holder.c2 = new QuadtreeNodeHolder();
                holder.c3 = new QuadtreeNodeHolder();
                this.CreateNodeRec(holder.c0, depth + 1, x, y);
                this.CreateNodeRec(holder.c1, depth + 1, x + (width / 2), y);
                this.CreateNodeRec(holder.c2, depth + 1, x + (width / 2), y + (width / 2));
                this.CreateNodeRec(holder.c3, depth + 1, x, y + (width / 2));
            }
        }
All Usage Examples Of Pathfinding.QuadtreeNode::SetPosition