private void OnPushSwitchRotation() { UserInterfaceAlbumShipViewer.Orientation orientation = this.mDisplayOrientation; if (orientation != UserInterfaceAlbumShipViewer.Orientation.Vertical) { if (orientation == UserInterfaceAlbumShipViewer.Orientation.Horizontal) { this.ChangeOrientation(UserInterfaceAlbumShipViewer.Orientation.Vertical, delegate { this.mUIAlbumShipViewerCameraController.Initialize(1024, 1024, 1f); this.mStateManager.PopState(); this.mStateManager.ResumeState(); }); } } else { this.ChangeOrientation(UserInterfaceAlbumShipViewer.Orientation.Horizontal, delegate { this.mUIAlbumShipViewerCameraController.Initialize(1024, 1024, 1f); this.mStateManager.PopState(); this.mStateManager.ResumeState(); }); } }
private void ChangeOrientation(UserInterfaceAlbumShipViewer.Orientation changeToOrientation, Action onFinished) { this.mDisplayOrientation = changeToOrientation; Sequence sequence = TweenSettingsExtensions.SetId <Sequence>(DOTween.Sequence(), UserInterfaceAlbumShipViewer.AnimationType.RotateDisplay); Tween tween = null; if (changeToOrientation != UserInterfaceAlbumShipViewer.Orientation.Vertical) { if (changeToOrientation == UserInterfaceAlbumShipViewer.Orientation.Horizontal) { Screen.set_orientation(3); Tween tween2 = ShortcutExtensions.DOLocalMove(this.mCamera_Main.get_transform(), Vector3.get_zero(), 0.3f, false); Tween tween3 = DOVirtual.Float(this.mCamera_Main.get_orthographicSize(), 1f, 0.9f, delegate(float size) { this.mCamera_Main.set_orthographicSize(size); }); Tween tween4 = TweenSettingsExtensions.OnComplete <Tweener>(ShortcutExtensions.DORotate(this.mCamera_Main.get_transform(), new Vector3(0f, 0f, 0f), 0.9f, 0), delegate { this.mCamera_Main.get_transform().set_rotation(Quaternion.Euler(0f, 0f, 0f)); }); TweenSettingsExtensions.Append(sequence, tween4); TweenSettingsExtensions.Join(sequence, tween); TweenSettingsExtensions.Join(sequence, tween2); TweenSettingsExtensions.Join(sequence, tween3); } } else { Screen.set_orientation(1); Tween tween2 = ShortcutExtensions.DOLocalMove(this.mCamera_Main.get_transform(), Vector3.get_zero(), 0.3f, false); Tween tween3 = DOVirtual.Float(this.mCamera_Main.get_orthographicSize(), (float)this.DISPLAY_HEIGHT / (float)this.DISPLAY_WIDTH, 0.9f, delegate(float size) { this.mCamera_Main.set_orthographicSize(size); }); Tween tween4 = TweenSettingsExtensions.OnComplete <Tweener>(ShortcutExtensions.DORotate(this.mCamera_Main.get_transform(), new Vector3(0f, 0f, 90f), 0.9f, 0), delegate { this.mCamera_Main.get_transform().set_rotation(Quaternion.Euler(0f, 0f, 90f)); }); TweenSettingsExtensions.Append(sequence, tween3); TweenSettingsExtensions.Join(sequence, tween); TweenSettingsExtensions.Join(sequence, tween2); TweenSettingsExtensions.Join(sequence, tween4); } TweenSettingsExtensions.OnComplete <Sequence>(sequence, delegate { if (onFinished != null) { onFinished.Invoke(); } }); }
private void OnCallShipDragListener(Vector2 delta) { bool flag = this.mStateManager.CurrentState == UserInterfaceAlbumShipViewer.State.Waiting; if (flag) { UserInterfaceAlbumShipViewer.Orientation orientation = this.mDisplayOrientation; if (orientation != UserInterfaceAlbumShipViewer.Orientation.Vertical) { if (orientation != UserInterfaceAlbumShipViewer.Orientation.Horizontal) { } } else { Vector2 vector = delta * this.ASPECT; } } }