コード例 #1
0
ファイル: Homing2D.cs プロジェクト: luis-l/UnityAssets
 void OnDrawGizmosSelected()
 {
     if (target != null)
     {
         Seek2D.DrawGizmos(target.position, Agent);
     }
 }
コード例 #2
0
ファイル: Pursuit2D.cs プロジェクト: luis-l/UnityAssets
 void OnDrawGizmosSelected()
 {
     if (targetRigid)
     {
         Seek2D.DrawGizmos(_futureSeekCache, Agent);
         DrawUtil.DrawLine(_futureSeekCache, targetRigid.position, Color.green);
     }
 }
コード例 #3
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);
                }
            }
        }