44 lines
2.1 KiB
C#
44 lines
2.1 KiB
C#
using Microsoft.Xna.Framework;
|
|
using Microsoft.Xna.Framework.Graphics;
|
|
|
|
namespace RecrownedAthenaeum.ScreenSystem
|
|
{
|
|
public interface ITransition
|
|
{
|
|
/// <summary>
|
|
/// Called once when the transition is needed.
|
|
/// <param name="Dimensions">The dimensions of the screen.</param>
|
|
/// </summary>
|
|
void InitiateTransition(Rectangle dimensions);
|
|
|
|
/// <summary>
|
|
/// Called every frame if the state of the screen this transition is placed upon is in the enter transition phase.
|
|
/// </summary>
|
|
/// <param name="delta">The time passed in seconds since the last frame.</param>
|
|
/// <param name="assetsLoaded">Whether or not if all assets have been loaded by the <see cref="ContentSystem"/>.</param>
|
|
/// <param name="previousScreenExitFrame">The frame being rendered by the screen as it exits. This can be null.</param>
|
|
/// <returns>If this returns true, then it is considered that this transition is complete.</returns>
|
|
bool EnteringTransition(double delta, bool assetsLoaded);
|
|
|
|
/// <summary>
|
|
/// Called every frame if the state of the screen this transition is placed upon is in the exit phase.
|
|
/// </summary>
|
|
/// <param name="delta">The time passed in seconds since the last frame.</param>
|
|
/// <param name="assetsLoaded">Whether or not if all assets have been loaded by the <see cref="ContentSystem"/>.</param>
|
|
/// <returns>If this returns true, then it is considered that this transition is complete.</returns>
|
|
bool ExitingTransition(double delta, bool assetsLoaded);
|
|
|
|
/// <summary>
|
|
/// Called once every frame while transition is active. Meant to draw transition.
|
|
/// </summary>
|
|
/// <param name="spriteBatch"></param>
|
|
void DrawTransition(SpriteBatch spriteBatch);
|
|
|
|
/// <summary>
|
|
/// Updates if the previous screen uses a render target for exit transition.
|
|
/// </summary>
|
|
/// <param name="previousScreenFrame">The frame of the previous screen.</param>
|
|
void UpdatePreviousScreenFrame(RenderTarget2D previousScreenFrame);
|
|
}
|
|
}
|