Example #1
0
 public override void OnToolUpdate()
 {
     if (DisableByAlt && !InputExtension.AltIsPressed && Contour.IsEmpty)
     {
         Tool.SetDefaultMode();
     }
     else
     {
         FillerPointsSelector.OnUpdate();
     }
 }
Example #2
0
        protected override void OnToolUpdate()
        {
            if (PauseMenu?.isVisible == true)
            {
                PrevTool = null;
                DisableTool();
                UIView.library.Hide("PauseMenu");
                return;
            }
            if ((RenderManager.CurrentCameraInfo.m_layerMask & (3 << 24)) == 0)
            {
                PrevTool = null;
                DisableTool();
                return;
            }

            MousePosition  = Input.mousePosition;
            MouseRay       = Camera.main.ScreenPointToRay(MousePosition);
            MouseRayLength = Camera.main.farClipPlane;
            MouseRayValid  = !UIView.IsInsideUI() && Cursor.visible;
            RaycastInput input = new RaycastInput(MouseRay, MouseRayLength);

            RayCast(input, out RaycastOutput output);
            MouseWorldPosition = output.m_hitPos;
            CameraDirection    = Vector3.forward.TurnDeg(Camera.main.transform.eulerAngles.y, true);

            switch (ToolMode)
            {
            case Mode.Node:
                GetHoveredNode();
                break;

            case Mode.Line:
            case Mode.Crosswalk:
                GetHoverPoint();
                break;

            case Mode.PanelAction:
                Panel.OnUpdate();
                break;

            case Mode.Filler:
                FillerPointsSelector.OnUpdate();
                break;
            }

            Info();

            base.OnToolUpdate();
        }
Example #3
0
 public override void RenderOverlay(RenderManager.CameraInfo cameraInfo)
 {
     RenderFillerLines(cameraInfo);
     RenderFillerConnectLine(cameraInfo);
     FillerPointsSelector.Render(cameraInfo);
 }
Example #4
0
 private void RenderSelectFillerMode(RenderManager.CameraInfo cameraInfo)
 {
     RenderFillerLines(cameraInfo);
     RenderFillerConnectLine(cameraInfo);
     FillerPointsSelector.Render(cameraInfo);
 }