Exemple #1
0
        // Token: 0x060029E6 RID: 10726 RVA: 0x001C4CB4 File Offset: 0x001C2EB4
        void IDisposable.Dispose()
        {
            GraphGizmoHelper graphGizmoHelper = this;

            this.Submit();
            ObjectPool <GraphGizmoHelper> .Release(ref graphGizmoHelper);
        }
        // Token: 0x06002992 RID: 10642 RVA: 0x001BF11D File Offset: 0x001BD31D
        public GraphGizmoHelper GetGizmoHelper(AstarPath active, RetainedGizmos.Hasher hasher)
        {
            GraphGizmoHelper graphGizmoHelper = ObjectPool <GraphGizmoHelper> .Claim();

            graphGizmoHelper.Init(active, hasher, this);
            return(graphGizmoHelper);
        }
Exemple #3
0
        // Token: 0x060029E0 RID: 10720 RVA: 0x001C4A90 File Offset: 0x001C2C90
        public Color NodeColor(GraphNode node)
        {
            if (this.showSearchTree && !GraphGizmoHelper.InSearchTree(node, this.debugData, this.debugPathID))
            {
                return(Color.clear);
            }
            Color result;

            if (node.Walkable)
            {
                switch (this.debugMode)
                {
                case GraphDebugMode.Areas:
                    return(AstarColor.GetAreaColor(node.Area));

                case GraphDebugMode.Penalty:
                    return(Color.Lerp(AstarColor.ConnectionLowLerp, AstarColor.ConnectionHighLerp, (node.Penalty - this.debugFloor) / (this.debugRoof - this.debugFloor)));

                case GraphDebugMode.Connections:
                    return(AstarColor.NodeConnection);

                case GraphDebugMode.Tags:
                    return(AstarColor.GetAreaColor(node.Tag));
                }
                if (this.debugData == null)
                {
                    result = AstarColor.NodeConnection;
                }
                else
                {
                    PathNode pathNode = this.debugData.GetPathNode(node);
                    float    num;
                    if (this.debugMode == GraphDebugMode.G)
                    {
                        num = pathNode.G;
                    }
                    else if (this.debugMode == GraphDebugMode.H)
                    {
                        num = pathNode.H;
                    }
                    else
                    {
                        num = pathNode.F;
                    }
                    result = Color.Lerp(AstarColor.ConnectionLowLerp, AstarColor.ConnectionHighLerp, (num - this.debugFloor) / (this.debugRoof - this.debugFloor));
                }
            }
            else
            {
                result = AstarColor.UnwalkableNode;
            }
            return(result);
        }
Exemple #4
0
 // Token: 0x060029DE RID: 10718 RVA: 0x001C49B8 File Offset: 0x001C2BB8
 public void DrawConnections(GraphNode node)
 {
     if (this.showSearchTree)
     {
         if (GraphGizmoHelper.InSearchTree(node, this.debugData, this.debugPathID) && this.debugData.GetPathNode(node).parent != null)
         {
             this.builder.DrawLine((Vector3)node.position, (Vector3)this.debugData.GetPathNode(node).parent.node.position, this.NodeColor(node));
             return;
         }
     }
     else
     {
         this.drawConnectionColor = this.NodeColor(node);
         this.drawConnectionStart = (Vector3)node.position;
         node.GetConnections(this.drawConnection);
     }
 }