예제 #1
0
        static void RenderSelected(Lidar myTarget, GizmoType gizmoType)
        {
            var initialColor = Color.blue;
            var finalColor   = Color.red;

            for (int i = 0; i < myTarget.nbOfBeams; i++)
            {
                var beamAngle = myTarget.GetAngle(i);
                Handles.color = Color.Lerp(initialColor, finalColor,
                                           myTarget.nbOfBeams == 1 ? .5f : i / (float)(myTarget.nbOfBeams - 1));
                DrawArc(myTarget, beamAngle - .5f);
            }
        }