using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using RecrownedAthenaeum.Render; namespace RecrownedAthenaeum.UI.ScreenSystem { /// /// Contracts a transition that the can use. /// public interface ITransition { /// /// Called once when the transition is needed. /// The dimensions of the screen. /// void InitiateTransition(Rectangle dimensions); /// /// Called every frame if the state of the screen this transition is placed upon is in the enter transition phase. /// /// The time passed in seconds since the last frame. /// Whether or not this transition is waiting on something. Usually the . /// If this returns true, then it is considered that this transition is complete. bool UpdateEnteringTransition(double delta, bool waiting); /// /// Called every frame if the state of the screen this transition is placed upon is in the exit phase. /// /// The time passed in seconds since the last frame. /// Whether or not this transition is waiting on something. Usually the . /// If this returns true, then it is considered that this transition is complete. bool UpdateExitingTransition(double delta, bool waiting); /// /// Called once every frame while transition is active. Meant to draw transition. /// /// void DrawTransition(ConsistentSpriteBatch spriteBatch); /// /// Updates if the previous screen uses a render target for exit transition. /// /// The frame of the previous screen. void UpdatePreviousScreenFrame(RenderTarget2D previousScreenFrame); } }