public override void OnToolUpdate() { if (DisableByAlt && !InputExtension.AltIsPressed && Contour.IsEmpty) { Tool.SetDefaultMode(); } else { FillerPointsSelector.OnUpdate(); } }
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(); }
public override void RenderOverlay(RenderManager.CameraInfo cameraInfo) { RenderFillerLines(cameraInfo); RenderFillerConnectLine(cameraInfo); FillerPointsSelector.Render(cameraInfo); }
private void RenderSelectFillerMode(RenderManager.CameraInfo cameraInfo) { RenderFillerLines(cameraInfo); RenderFillerConnectLine(cameraInfo); FillerPointsSelector.Render(cameraInfo); }