Esempio n. 1
0
 public void ResetVantage()
 {
     if (currentVantagePoint != null)
     {
         currentVantagePoint.HideIndicator();
     }
     currentVantagePoint = null;
     if (!inVantage)
     {
         return;
     }
     ExitVantageView();
 }
Esempio n. 2
0
        public void OnSceneGUI()
        {
            VantagePoint vp = (VantagePoint)target;

            Vector2 extent = new Vector2(Camera.main.aspect * vp.HalfCameraHeight,
                                         vp.HalfCameraHeight);

            Vector2 lowerLeft  = (Vector2)vp.CameraPosition + extent;
            Vector2 upperRight = (Vector2)vp.CameraPosition - extent;
            Vector2 upperLeft  = new Vector2(lowerLeft.x, upperRight.y);
            Vector2 lowerRight = new Vector2(upperRight.x, lowerLeft.y);

            Handles.color = Color.yellow;
            Handles.DrawLine(lowerLeft, lowerRight);
            Handles.DrawLine(upperRight, lowerRight);
            Handles.DrawLine(upperRight, upperLeft);
            Handles.DrawLine(lowerLeft, upperLeft);
        }
Esempio n. 3
0
 public void RegisterCurrentVantage(VantagePoint vantagePoint)
 {
     vantagePoint.ShowIndicator();
     currentVantagePoint = vantagePoint;
 }