2018-11-30 02:41:06 +00:00
|
|
|
|
using Microsoft.Xna.Framework;
|
|
|
|
|
using Microsoft.Xna.Framework.Graphics;
|
2019-12-28 20:35:01 +00:00
|
|
|
|
using RecrownedAthenaeum.Graphics.Render;
|
2018-11-30 02:41:06 +00:00
|
|
|
|
|
2019-12-28 21:41:06 +00:00
|
|
|
|
namespace RecrownedAthenaeum.Graphics.UI.ScreenSystem
|
2018-11-30 02:41:06 +00:00
|
|
|
|
{
|
2019-01-14 07:26:46 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Contracts a transition that the <see cref="ScreenManager"/> can use.
|
|
|
|
|
/// </summary>
|
2018-11-30 02:41:06 +00:00
|
|
|
|
public interface ITransition
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Called once when the transition is needed.
|
2019-01-14 07:26:46 +00:00
|
|
|
|
/// <param name="dimensions">The dimensions of the screen.</param>
|
2018-11-30 02:41:06 +00:00
|
|
|
|
/// </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>
|
2019-11-24 20:49:53 +00:00
|
|
|
|
/// <param name="waiting">Whether or not this transition is waiting on something. Usually the <see cref="Assets"/>.</param>
|
2018-11-30 02:41:06 +00:00
|
|
|
|
/// <returns>If this returns true, then it is considered that this transition is complete.</returns>
|
2019-01-14 07:26:46 +00:00
|
|
|
|
bool UpdateEnteringTransition(double delta, bool waiting);
|
2018-11-30 02:41:06 +00:00
|
|
|
|
|
|
|
|
|
/// <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>
|
2019-11-24 20:49:53 +00:00
|
|
|
|
/// <param name="waiting">Whether or not this transition is waiting on something. Usually the <see cref="Assets"/>.</param>
|
2018-11-30 02:41:06 +00:00
|
|
|
|
/// <returns>If this returns true, then it is considered that this transition is complete.</returns>
|
2019-01-14 07:26:46 +00:00
|
|
|
|
bool UpdateExitingTransition(double delta, bool waiting);
|
2018-11-30 02:41:06 +00:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Called once every frame while transition is active. Meant to draw transition.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="spriteBatch"></param>
|
2019-03-24 00:04:43 +00:00
|
|
|
|
void DrawTransition(ConsistentSpriteBatch spriteBatch);
|
2018-11-30 02:41:06 +00:00
|
|
|
|
|
|
|
|
|
/// <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);
|
|
|
|
|
}
|
|
|
|
|
}
|