|
Arcade Shooter
|
Base class for all game screens and menus. More...
#include <Screen.h>
Public Member Functions | |
| virtual void | LoadContent (ResourceManager *pResourceManager) |
| Called when resources need to be loaded. More... | |
| virtual void | UnloadContent () |
| Called when resources need to be unloaded. Override this method to unload any screen-specific resources. | |
| virtual void | HandleInput (const InputState *pInput) |
| Called when the game has determined that player input needs to be processed. More... | |
| virtual void | Update (const GameTime *pGameTime)=0 |
| Called when the game has determined that screen logic needs to be processed. More... | |
| virtual void | Draw (SpriteBatch *pSpriteBatch)=0 |
| Called when the game determines it is time to draw a frame. More... | |
| virtual bool | IsExiting () const |
| Determines if the screen is currently exiting. More... | |
| float | GetAlpha () const |
| Gets the overall screen transition alpha value (or opacity). This is handy for fading screens in and out. More... | |
| virtual ScreenManager * | GetScreenManager () |
| Gets a pointer to the ScreenManager, for managing game screens. More... | |
| virtual Game * | GetGame () const |
| Gets a pointer to the Game. More... | |
| virtual ParticleManager * | GetParticleManager () const |
| Gets a pointer to the ParticleManager, for creating and managing particles. More... | |
| virtual void | SetScreenManager (ScreenManager *pScreenManager) |
| Gets a pointer to the ScreenManager, for managing game screens. More... | |
| virtual void | Show () |
| Tells the screen to transition in. | |
| virtual void | Exit () |
| Tells the screen to transition out. When the screen has completed its transition, UnloadContent() will be called, and the ScreenManager will remove it. More... | |
| virtual void | SetExitCallback (OnExit callback) |
| Sets the callback function for when the Exit() is called. More... | |
| virtual void | SetRemoveCallback (OnRemove callback) |
| Sets the callback function for when the screen is about to be removed by the screen manager. More... | |
| virtual double | GetTransitionOutTime () const |
| Get the time in seconds that the screen will transition out. More... | |
Protected Types | |
| enum | ScreenTransition { ScreenTransition::NONE, ScreenTransition::IN, ScreenTransition::OUT } |
| Defines the state of the transition between screens. More... | |
Protected Member Functions | |
| 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. More... | |
| virtual void | SetTransitionInTime (double seconds) |
| Set the time in seconds that the screen should transition in. More... | |
| virtual void | SetTransitionOutTime (double seconds) |
| Set the time in seconds that the screen should transition out. More... | |
| virtual double | GetTransitionInTime () const |
| Get the time in seconds that the screen will transition in. More... | |
| virtual ScreenTransition | GetTransition () const |
| Get the current transition state of the screen. More... | |
| virtual float | GetTransitionValue () const |
| Get the interpolated value (between zero and one) of the screen transition. More... | |
| virtual bool | NeedsToBeRemoved () const |
| Determines if the screen has completely faded out and needs to be removed by the ScreenManager. More... | |
| virtual void | UseRenderTarget () |
| Forces all screen rendering to a render target. | |
| virtual RenderTarget * | GetRenderTarget () const |
| Get screen's render target. More... | |
| virtual Color | GetRenderTargetColor () const |
| Get the color that will be used to tint the render target. More... | |
Friends | |
| class | ScreenManager |
Base class for all game screens and menus.
|
strongprotected |
|
pure virtual |
Called when the game determines it is time to draw a frame.
| pSpriteBatch | The game's sprite batch, used for rendering. |
Implemented in KatanaEngine::MenuScreen.
|
virtual |
Tells the screen to transition out. When the screen has completed its transition, UnloadContent() will be called, and the ScreenManager will remove it.
|
inline |
Gets the overall screen transition alpha value (or opacity). This is handy for fading screens in and out.
|
virtual |
Gets a pointer to the Game.
|
virtual |
Gets a pointer to the ParticleManager, for creating and managing particles.
|
inlineprotectedvirtual |
Get screen's render target.
|
inlineprotectedvirtual |
Get the color that will be used to tint the render target.
|
inlinevirtual |
Gets a pointer to the ScreenManager, for managing game screens.
|
inlineprotectedvirtual |
Get the current transition state of the screen.
|
inlineprotectedvirtual |
Get the time in seconds that the screen will transition in.
|
inlinevirtual |
Get the time in seconds that the screen will transition out.
|
inlineprotectedvirtual |
Get the interpolated value (between zero and one) of the screen transition.
|
inlinevirtual |
Called when the game has determined that player input needs to be processed.
| pInput | The current state of all player input devices. |
Reimplemented in KatanaEngine::MenuScreen.
|
inlinevirtual |
Determines if the screen is currently exiting.
|
inlinevirtual |
Called when resources need to be loaded.
| pResourceManager | The game's resource manager, used for loading and managing game resources. |
|
inlineprotectedvirtual |
Determines if the screen has completely faded out and needs to be removed by the ScreenManager.
|
inlinevirtual |
Sets the callback function for when the Exit() is called.
| callback | The callback function. |
|
protectedvirtual |
Sets the flags that determine if the underlaying screen should handle input, update, and/or render.
| draw | Set this flag to true if the underlaying screen should render. |
| update | Set this flag to true if the underlaying screen should update. |
| handleInput | Set this flag to true if the underlaying screen should handle user input. |
|
inlinevirtual |
Sets the callback function for when the screen is about to be removed by the screen manager.
| callback | The callback function. |
|
virtual |
Gets a pointer to the ScreenManager, for managing game screens.
|
inlineprotectedvirtual |
Set the time in seconds that the screen should transition in.
| seconds | The transition time. |
|
inlineprotectedvirtual |
Set the time in seconds that the screen should transition out.
| seconds | The transition time. |
|
pure virtual |
Called when the game has determined that screen logic needs to be processed.
| pGameTime | Timing values including time since last update. |
Implemented in KatanaEngine::MenuScreen.
1.8.13