The loading screen coordinates transitions between the menu system and the game itself. Normally one screen will transition off at the same time as the next screen is transitioning on, but for larger transitions that can take a longer time to load their data, we want the menu system to be entirely gone before we start loading the game. This is done as follows:
More...
|
| vxLoadingScreen (vxBaseScene[] screensToLoad, bool isLoadingAsync=true) |
| The constructor is private: loading screens should be activated via the static Load method instead.
|
|
override void | UnloadContent () |
| Unload content for the screen.
|
|
override void | Draw () |
| Draws the loading screen.
|
|
virtual void | LoadContent () |
| Load graphics content for the screen.
|
|
virtual System.Collections.IEnumerator | LoadContentAsync () |
| Loads content as part of a Coroutine allowing the game to update frames during the loading process.
|
|
virtual bool | PlaySound (vxBaseScene sender, SoundEffect SoundEffect, float Volume=1, float Pitch=0) |
|
void | ExitScreen () |
| Tells the screen to go away. Unlike ScreenManager.RemoveScreen, which instantly kills the screen, this method respects the transition timings and will give the screen a chance to gradually transition off.
|
|
virtual void | Dispose () |
|
|
bool | IsLoadingAsync [get] |
| Is the loading async, i.e. should we spread it over a number of frames or should we load it all at once?
|
|
float | LoadedPercentage [get] |
| The loaded percentage from 0 to 1.
|
|
bool | IsPopup [get, protected set] |
| Normally when one screen is brought up over the top of another, the first screen will transition off to make room for the new one. This property indicates whether the screen is only a small popup, in which case screens underneath it do not need to bother transitioning off.
|
|
bool | IsRemoved [get, set] |
| Has this scene been removed?
|
|
TimeSpan | TransitionOnTime [get, protected set] |
| Indicates how long the screen takes to transition on when it is activated.
|
|
TimeSpan | TransitionOffTime [get, protected set] |
| Indicates how long the screen takes to transition off when it is deactivated.
|
|
float | TransitionPosition [get, protected set] |
| Gets the current position of the screen transition, ranging from zero (fully active, no transition) to one (transitioned fully off to nothing).
|
|
float | TransitionAlpha [get] |
| Gets the current alpha of the screen transition, ranging from 1 (fully active, no transition) to 0 (transitioned fully off to nothing).
|
|
ScreenState | ScreenState [get, protected set] |
| Gets the current screen transition state.
|
|
bool | IsExiting [get, set] |
| There are two possible reasons why a screen might be transitioning off. It could be temporarily going away to make room for another screen that is on top of it, or it could be going away for good. This property indicates whether the screen is exiting for real: if set, the screen will automatically remove itself as soon as the transition finishes.
|
|
bool | IsActive [get] |
| Checks whether this screen is active and can respond to user input.
|
|
bool | otherScreenHasFocus [get, set] |
|
bool | IsFirstLoop [get] |
| Gets a value indicating whether this T:VerticesEngine.vxGameBaseScreen is first loop.
|
|
bool | IsLoadingFile [get, set] |
| Returns whether we're currently loading a file or not.
|
|
PlayerIndex? | ControllingPlayer [get, set] |
| Gets the index of the player who is currently controlling this screen, or null if it is accepting input from any player. This is used to lock the game to a specific player profile. The main menu responds to input from any connected gamepad, but whichever player makes a selection from this menu is given control over all subsequent screens, so other gamepads are inactive until the controlling player returns to the main menu.
|
|
bool | IsContentLoaded [get, set] |
| Has all the content been loaded yet?
|
|
bool | coveredByOtherScreen [get, set] |
|
The loading screen coordinates transitions between the menu system and the game itself. Normally one screen will transition off at the same time as the next screen is transitioning on, but for larger transitions that can take a longer time to load their data, we want the menu system to be entirely gone before we start loading the game. This is done as follows:
- Tell all the existing screens to transition off.
- Activate a loading screen, which will transition on at the same time.
- The loading screen watches the state of the previous screens.
- When it sees they have finished transitioning off, it activates the real next screen, which may take a long time to load its data. The loading screen will be the only thing displayed while this load is taking place.