Enfusion Script API
|
Interface for classes implementing animation or progress bar of the loading screen. More...
Public Member Functions | |
void | LoadingAnim (WorkspaceWidget workspaceWidget) |
void | Show () |
Called just before loading animation is shown. | |
void | Update (float timeSlice, float progress, float minDurationRatio) |
Used for updating the loading screen animations and progress bars. | |
void | Hide () |
Called when loading animation has finished and should be hidden. | |
Public Attributes | |
WorkspaceWidget | m_WorkspaceWidget |
Interface for classes implementing animation or progress bar of the loading screen.
To customize the implementation, override Game::CreateLoadingAnim() function to return your own implementation of LoadingAnim. You should perform any expensive setup, such as loading UI layout, in the constructor to avoid freezes due to loading of resources when game shows the loading screen.
void LoadingAnim.LoadingAnim | ( | WorkspaceWidget | workspaceWidget | ) |
void LoadingAnim.Hide | ( | ) |
Called when loading animation has finished and should be hidden.
Implemented in BaseLoadingAnim.
void LoadingAnim.Show | ( | ) |
Called just before loading animation is shown.
You shouldn't perform any expensive operations here (such as loading images and UI layouts) to avoid freezes when loading screen is shown.
Implemented in BaseLoadingAnim.
Used for updating the loading screen animations and progress bars.
Progress value is based on how many resources are still left in loading queue. However, loading new resources can cause more things to be added to the queue, so this value can jump up and down and these cases need to be handled, otherwise progress may appear to go backwards.
Some platforms require that loading screen is visible for at least certain minimum amount of time. To account for this, minDurationRatio provides percentage of this minimum duration that has already elapsed.
timeSlice | Time slice in seconds. |
progress | Unmodified loading progress value between 0 and 1. This value may decrease. |
minDurationRatio | Ratio of minimal duration that has already elapsed, between 0 and 1. This value never decreases. |
Implemented in BaseLoadingAnim.
WorkspaceWidget LoadingAnim.m_WorkspaceWidget |