void Update() { if (CurrentCamera == null) { CurrentCamera = Camera.main; if (CurrentCamera == null) { CurrentCamera = Camera.current; } } if (Camera.current != null) { if (CurrentCamera != Camera.current) { CurrentCamera = Camera.current; } } // check a current camera Mode = NavMode.Third; for (int i = 0; i < CockpitCamera.Length; i++) { if (CockpitCamera [i] != null) { if (CockpitCamera [i].camera.enabled) { if (i == PrimaryCameraIndex) { Mode = NavMode.Cockpit; } } } } }
void AnalyticClick() { _navMode = NavMode.analytic; titleMenu.SetActive(false); FilterSystem.Instance.canvas.SetActive(true); FilterSystem.Instance.BaseFilter(); }
void RunTestClick() { _navMode = NavMode.testing; titleMenu.SetActive(false); Menu.Instance.menuParent.SetActive(true); StartCoroutine(ResultsIO.Instance.Init()); //begin the baseline fetch/testsystem }
internal override void Display() { if (!IsActive) { return; } ImGui.SetNextWindowSize(new Vector2(600f, 400f), ImGuiCond.FirstUseEver); if (ImGui.Begin("Nav Control", ref IsActive, _flags)) { BorderGroup.Begin("Mode"); if (ImGui.Button("Manual Thrust")) { _navMode = NavMode.Thrust; } if (ImGui.Button("Hohmann Transfer")) { _navMode = NavMode.HohmannTransfer; } if (ImGui.Button("Phase Change")) { _navMode = NavMode.PhaseChange; } if (ImGui.Button("High Δv Intercept")) { _navMode = NavMode.HighDVIntercept; } if (ImGui.Button("Porkchop Plot")) { _navMode = NavMode.PorkChopPlot; } BorderGroup.End(); ImGui.NewLine(); ImGui.Text("Availible Δv: " + Stringify.Velocity(_totalDV)); switch (_navMode) { case NavMode.Thrust: { DisplayThrustMode(); break; } case NavMode.PhaseChange: DisplayPhaseChangeMode(); break; case NavMode.HohmannTransfer: DisplayHohmannMode(); break; case NavMode.None: break; default: break; } } }
void Update() { // check a current camera Mode = NavMode.Third; for (int i = 0; i < CockpitCamera.Length; i++) { if (CockpitCamera [i] != null) { if (CockpitCamera [i].GetComponent <Camera>().enabled) { if (i == PrimaryCameraIndex) { Mode = NavMode.Cockpit; } } } } }
void Update() { if (CockpitCamera) { if (CockpitCamera.GetComponent <Camera>().enabled) { Mode = NavMode.Cockpit; } else { Mode = NavMode.Third; } } else { Mode = NavMode.Third; } }
bool HandleMouse(Rect Viewport) { var result = false; if (Event.current.type == EventType.MouseDown) { if (Event.current.button == 0) { m_NavMode = NavMode.Rotating; } else if (Event.current.button == 1) { m_NavMode = NavMode.Zooming; } m_PreviousMousePosition = Event.current.mousePosition; result = true; } if (Event.current.type == EventType.MouseUp || Event.current.rawType == EventType.MouseUp) { m_NavMode = NavMode.None; } if (m_NavMode != NavMode.None) { var mouseDelta = Event.current.mousePosition - m_PreviousMousePosition; switch (m_NavMode) { case NavMode.Rotating: m_CameraTheta = (m_CameraTheta - mouseDelta.x * 0.003f) % (Mathf.PI * 2); m_CameraPhi = Mathf.Clamp(m_CameraPhi - mouseDelta.y * 0.003f, 0.2f, Mathf.PI - 0.2f); break; case NavMode.Zooming: m_CameraDistance = Mathf.Clamp(mouseDelta.y * 0.01f + m_CameraDistance, 1, 10); break; } result = true; } m_PreviousMousePosition = Event.current.mousePosition; return(result); }
public NavigatingToParameters(NavMode mode, INavigationInfo from, INavigationInfo to, bool resuming, IPropertyBagEx sessionState) : base(from, to, sessionState) { this.Resuming = resuming; this.NavigationMode = mode; }
private void HandleState() { NavMode target = agent.data.targetMode; switch (target) { case NavMode.MoveToCrowd: if (mPlanner != mMoveToCrowd) { TransitionState(mMoveToCrowd); } break; case NavMode.FollowGoalCrowd: if (mPlanner != mFollowGoal) { TransitionState(mFollowGoal); } break; case NavMode.MoveToSimple: if (mPlanner != mSimpleMove) { TransitionState(mSimpleMove); } break; case NavMode.MoveToLocal: if (mPlanner != mLocalMove) { TransitionState(mLocalMove); } break; case NavMode.SuspendInCrowd: if (mPlanner != mSuspendInCrowd) { TransitionState(mSuspendInCrowd); } break; case NavMode.Suspended: if (mPlanner != NullState.Instance) { Suspend(); } break; } }
private void toolStripNavButton_MouseRemoveCapture(object sender, EventArgs e) { this.timerNavigation.Enabled = true; this.timerNavigation.Enabled = false; this.eNavMode = NavMode.None; }
private void c_bZoomOut_MouseDown(object sender, MouseEventArgs e) { this.timerNavigation.Enabled = true; this.bNavTimer = false; this.eNavMode = NavMode.ZoomOut; }
private void c_bRotateRight_MouseDown(object sender, MouseEventArgs e) { this.timerNavigation.Enabled = true; this.bNavTimer = false; this.eNavMode = NavMode.RotateLeft; }
public void setNavigationMode(NavMode mode) { navigationMode = mode; }
void Start() { Mode = NavMode.Third; }
public NavigatingToParameters(NavMode mode, INavigationInfo from, INavigationInfo to, bool resuming, IDictionary <string, object> sessionState) : base(from, to, sessionState) { this.Resuming = resuming; this.NavigationMode = mode; }
void Update () { if(CockpitCamera){ if (CockpitCamera.GetComponent<Camera>().enabled) { Mode = NavMode.Cockpit; } else { Mode = NavMode.Third; } }else{ Mode = NavMode.Third; } }