public TransformTransition(Func <Scene> sceneLoadAction, TransformTransitionType transitionType = TransformTransitionType.ZoomOut) : base( sceneLoadAction, true) { _destinationRect = PreviousSceneRender.Bounds; _textureBounds = _destinationRect; switch (transitionType) { case TransformTransitionType.ZoomOut: _finalRenderRect = new Rectangle(Screen.Width / 2, Screen.Height / 2, 0, 0); break; case TransformTransitionType.ZoomIn: _finalRenderRect = new Rectangle(-Screen.Width * 5, -Screen.Height * 5, _destinationRect.Width * 10, _destinationRect.Height * 10); break; case TransformTransitionType.SlideRight: _finalRenderRect = new Rectangle(Screen.Width, 0, _destinationRect.Width, _destinationRect.Height); break; case TransformTransitionType.SlideLeft: _finalRenderRect = new Rectangle(-Screen.Width, 0, _destinationRect.Width, _destinationRect.Height); break; case TransformTransitionType.SlideUp: _finalRenderRect = new Rectangle(0, -Screen.Height, _destinationRect.Width, _destinationRect.Height); break; case TransformTransitionType.SlideDown: _finalRenderRect = new Rectangle(0, Screen.Height, _destinationRect.Width, _destinationRect.Height); break; case TransformTransitionType.SlideBottomRight: _finalRenderRect = new Rectangle(Screen.Width, Screen.Height, _destinationRect.Width, _destinationRect.Height); break; case TransformTransitionType.SlideBottomLeft: _finalRenderRect = new Rectangle(-Screen.Width, Screen.Height, _destinationRect.Width, _destinationRect.Height); break; case TransformTransitionType.SlideTopRight: _finalRenderRect = new Rectangle(Screen.Width, -Screen.Height, _destinationRect.Width, _destinationRect.Height); break; case TransformTransitionType.SlideTopLeft: _finalRenderRect = new Rectangle(-Screen.Width, -Screen.Height, _destinationRect.Width, _destinationRect.Height); break; } }
public TransformTransition( Func<Scene> sceneLoadAction, TransformTransitionType transitionType = TransformTransitionType.ZoomOut ) : base(sceneLoadAction, true) { _destinationRect = previousSceneRender.Bounds; _textureBounds = _destinationRect; switch( transitionType ) { case TransformTransitionType.ZoomOut: _finalRenderRect = new Rectangle( Screen.width / 2, Screen.height / 2, 0, 0 ); break; case TransformTransitionType.ZoomIn: _finalRenderRect = new Rectangle( -Screen.width * 5, -Screen.height * 5, _destinationRect.Width * 10, _destinationRect.Height * 10 ); break; case TransformTransitionType.SlideRight: _finalRenderRect = new Rectangle( Screen.width, 0, _destinationRect.Width, _destinationRect.Height ); break; case TransformTransitionType.SlideLeft: _finalRenderRect = new Rectangle( -Screen.width, 0, _destinationRect.Width, _destinationRect.Height ); break; case TransformTransitionType.SlideUp: _finalRenderRect = new Rectangle( 0, -Screen.height, _destinationRect.Width, _destinationRect.Height ); break; case TransformTransitionType.SlideDown: _finalRenderRect = new Rectangle( 0, Screen.height, _destinationRect.Width, _destinationRect.Height ); break; case TransformTransitionType.SlideBottomRight: _finalRenderRect = new Rectangle( Screen.width, Screen.height, _destinationRect.Width, _destinationRect.Height ); break; case TransformTransitionType.SlideBottomLeft: _finalRenderRect = new Rectangle( -Screen.width, Screen.height, _destinationRect.Width, _destinationRect.Height ); break; case TransformTransitionType.SlideTopRight: _finalRenderRect = new Rectangle( Screen.width, -Screen.height, _destinationRect.Width, _destinationRect.Height ); break; case TransformTransitionType.SlideTopLeft: _finalRenderRect = new Rectangle( -Screen.width, -Screen.height, _destinationRect.Width, _destinationRect.Height ); break; } }
public TransformTransition(TransformTransitionType transitionType = TransformTransitionType.ZoomOut) : this( null, transitionType) { }
public TransformTransition(TransformTransitionType transitionType = TransformTransitionType.ZoomOut) { this.destinationRect = this.PreviousSceneRender.Bounds; switch (transitionType) { case TransformTransitionType.ZoomOut: this.finalRenderRect = new Rectangle( Core.Instance.Screen.Width / 2, Core.Instance.Screen.Height / 2, 0, 0); break; case TransformTransitionType.ZoomIn: this.finalRenderRect = new Rectangle( -Core.Instance.Screen.Width * 5, -Core.Instance.Screen.Height * 5, this.destinationRect.Width * 10, this.destinationRect.Height * 10); break; case TransformTransitionType.SlideRight: this.finalRenderRect = new Rectangle( Core.Instance.Screen.Width, 0, this.destinationRect.Width, this.destinationRect.Height); break; case TransformTransitionType.SlideLeft: this.finalRenderRect = new Rectangle( -Core.Instance.Screen.Width, 0, this.destinationRect.Width, this.destinationRect.Height); break; case TransformTransitionType.SlideUp: this.finalRenderRect = new Rectangle( 0, -Core.Instance.Screen.Height, this.destinationRect.Width, this.destinationRect.Height); break; case TransformTransitionType.SlideDown: this.finalRenderRect = new Rectangle( 0, Core.Instance.Screen.Height, this.destinationRect.Width, this.destinationRect.Height); break; case TransformTransitionType.SlideBottomRight: this.finalRenderRect = new Rectangle( Core.Instance.Screen.Width, Core.Instance.Screen.Height, this.destinationRect.Width, this.destinationRect.Height); break; case TransformTransitionType.SlideBottomLeft: this.finalRenderRect = new Rectangle( -Core.Instance.Screen.Width, Core.Instance.Screen.Height, this.destinationRect.Width, this.destinationRect.Height); break; case TransformTransitionType.SlideTopRight: this.finalRenderRect = new Rectangle( Core.Instance.Screen.Width, -Core.Instance.Screen.Height, this.destinationRect.Width, this.destinationRect.Height); break; case TransformTransitionType.SlideTopLeft: this.finalRenderRect = new Rectangle( -Core.Instance.Screen.Width, -Core.Instance.Screen.Height, this.destinationRect.Width, this.destinationRect.Height); break; } }
public TransformTransition( TransformTransitionType transitionType = TransformTransitionType.ZoomOut ) : this( null, transitionType ) {}