Esempio n. 1
0
        void OnDrawGizmosSelected()
        {
            Evade2D.DrawGizmos(Agent, evadeSensor);
            Arrive2D.DrawGizmos(Agent, arriveSensor);

            // Draw the obstacle sensor dimensions
            DrawUtil.DrawCircle(_obstacleSensor.transform.position, _obstacleSensorCollider.radius, Color.yellow);
        }
Esempio n. 2
0
        void OnDrawGizmosSelected()
        {
            if (leader != null)
            {
                Vector2 worldOffset = leader.graphicTransform.TransformPoint(localOffset);
                DrawUtil.DrawCrosshair(worldOffset, 1f, Color.white);

                Arrive2D.DrawGizmos(Agent, arriveSensor);
            }
        }
Esempio n. 3
0
        void OnDrawGizmosSelected()
        {
            if (targetsAreValid())
            {
                Arrive2D.DrawGizmos(Agent, sensor);

                Vector2 agentPosition = Agent.transform.position;

                // Draw the association of the targets to interpose.
                DrawUtil.DrawLine(agentPosition, targetA.position, Color.green);
                DrawUtil.DrawLine(agentPosition, targetB.position, Color.green);
            }
        }
Esempio n. 4
0
        void OnDrawGizmosSelected()
        {
            if (path.waypoints != null && path.Size != 0)
            {
                path.DrawGizmos();

                // Draw the arrival towards the last end point (if no looping)
                if (_bUsingArrive)
                {
                    Arrive2D.DrawGizmos(Agent, arriveSensor);
                }

                // Show which current waypoint we are traveling to.
                else
                {
                    Seek2D.DrawGizmos(path.CurrentWaypoint(), Agent);
                }
            }
        }