private void Update() { if (windowInterface == null) { return; } if (!windowInterface.IsVisible) { return; } windowInterface.UpdateWindow(); }
private void Update() { if (!expanding) { return; } if (VesselExpansion == null) { return; } float currentX = VesselExpansion.anchoredPosition.x; if (currentX < movingTo) { VesselExpansion.anchoredPosition = new Vector2(VesselExpansion.anchoredPosition.x + 5, VesselExpansion.anchoredPosition.y); if (VesselExpansion.anchoredPosition.x >= movingTo) { VesselExpansion.anchoredPosition = new Vector2(movingTo, VesselExpansion.anchoredPosition.y); expanding = false; } } else { VesselExpansion.anchoredPosition = new Vector2(VesselExpansion.anchoredPosition.x - 5, VesselExpansion.anchoredPosition.y); if (VesselExpansion.anchoredPosition.x <= movingTo) { VesselExpansion.anchoredPosition = new Vector2(movingTo, VesselExpansion.anchoredPosition.y); expanding = false; } } if (windowInterface == null) { return; } if (!windowInterface.IsVisible) { return; } windowInterface.UpdateWindow(); }