72 virtual bool IsExiting()
const {
return m_isExiting; }
79 float GetAlpha()
const {
return m_transitionValue; }
137 virtual void SetPassthroughFlags(
const bool draw =
false,
const bool update =
false,
const bool handleInput =
false);
183 bool m_handleInputBelow;
188 bool m_needsToBeRemoved;
190 double m_transitionInTime;
191 double m_transitionOutTime;
195 float m_transitionValue;
196 double m_transitionTime;
203 void TransitionOut();
205 void UpdateTransition(
const GameTime *pGameTime);
207 bool UpdateBelow()
const {
return m_updateBelow; }
208 bool DrawBelow()
const {
return m_drawBelow; }
209 bool HandleInputBelow()
const {
return m_handleInputBelow; }
virtual RenderTarget * GetRenderTarget() const
Get screen's render target.
Definition: Screen.h:171
The screen is not transitioning.
virtual ScreenManager * GetScreenManager()
Gets a pointer to the ScreenManager, for managing game screens.
Definition: Screen.h:83
Updates, renders, and manages transitions between instances of the Screen class.
Definition: ScreenManager.h:22
ScreenTransition
Defines the state of the transition between screens.
Definition: Screen.h:124
virtual void UnloadContent()
Called when resources need to be unloaded. Override this method to unload any screen-specific resourc...
Definition: Screen.h:56
Contains a 2D texture that can be used as a render target.
Definition: RenderTarget.h:17
Base class for all game screens and menus.
Definition: Screen.h:39
virtual void Exit()
Tells the screen to transition out. When the screen has completed its transition, UnloadContent() wil...
Definition: Screen.cpp:97
void(* OnExit)(Screen *pScreen)
Callback function for when Exit() is called on a screen and it begins to transition out...
Definition: Screen.h:27
static const Color White
White.
Definition: Color.h:198
Contains timing values for game updates and rendering.
Definition: GameTime.h:17
virtual void LoadContent(ResourceManager *pResourceManager)
Called when resources need to be loaded.
Definition: Screen.h:52
Manages the active particles in a particle system.
Definition: ParticleManager.h:18
virtual bool IsExiting() const
Determines if the screen is currently exiting.
Definition: Screen.h:72
virtual void Show()
Tells the screen to transition in.
Definition: Screen.cpp:92
virtual double GetTransitionInTime() const
Get the time in seconds that the screen will transition in.
Definition: Screen.h:149
virtual void Update(const GameTime *pGameTime)=0
Called when the game has determined that screen logic needs to be processed.
void(* OnRemove)(Screen *pScreen)
Callback function for when a screen has completely exited and is about to be removed by the screen ma...
Definition: Screen.h:36
Represents a four-component color using red, green, blue, and alpha data.
Definition: Color.h:17
virtual Color GetRenderTargetColor() const
Get the color that will be used to tint the render target.
Definition: Screen.h:175
virtual Game * GetGame() const
Gets a pointer to the Game.
Definition: Screen.cpp:124
virtual void SetRemoveCallback(OnRemove callback)
Sets the callback function for when the screen is about to be removed by the screen manager...
Definition: Screen.h:114
virtual void SetExitCallback(OnExit callback)
Sets the callback function for when the Exit() is called.
Definition: Screen.h:109
virtual void SetTransitionInTime(double seconds)
Set the time in seconds that the screen should transition in.
Definition: Screen.h:141
float GetAlpha() const
Gets the overall screen transition alpha value (or opacity). This is handy for fading screens in and ...
Definition: Screen.h:79
virtual void SetPassthroughFlags(const bool draw=false, const bool update=false, const bool handleInput=false)
Sets the flags that determine if the underlaying screen should handle input, update, and/or render.
Definition: Screen.cpp:134
Base class for all games. Provides graphics initialization, game loop, and rendering code...
Definition: Game.h:18
virtual void SetScreenManager(ScreenManager *pScreenManager)
Gets a pointer to the ScreenManager, for managing game screens.
Definition: Screen.cpp:87
virtual void HandleInput(const InputState *pInput)
Called when the game has determined that player input needs to be processed.
Definition: Screen.h:60
virtual void Draw(SpriteBatch *pSpriteBatch)=0
Called when the game determines it is time to draw a frame.
virtual ParticleManager * GetParticleManager() const
Gets a pointer to the ParticleManager, for creating and managing particles.
Definition: Screen.cpp:129
virtual double GetTransitionOutTime() const
Get the time in seconds that the screen will transition out.
Definition: Screen.h:118
Enables a group of sprites to be drawn using the same settings.
Definition: SpriteBatch.h:44
The screen is transitioning out.
The screen is transitioning in.
virtual void SetTransitionOutTime(double seconds)
Set the time in seconds that the screen should transition out.
Definition: Screen.h:145
Loads and manages the lifespan of objects from external files.
Definition: ResourceManager.h:17
virtual bool NeedsToBeRemoved() const
Determines if the screen has completely faded out and needs to be removed by the ScreenManager.
Definition: Screen.h:163
virtual void UseRenderTarget()
Forces all screen rendering to a render target.
Definition: Screen.cpp:141
virtual ScreenTransition GetTransition() const
Get the current transition state of the screen.
Definition: Screen.h:153
virtual float GetTransitionValue() const
Get the interpolated value (between zero and one) of the screen transition.
Definition: Screen.h:158
Katana Engine is a library of classes, interfaces, and value types that provides a foundation for dev...
Definition: Animation.cpp:14