Navigation
Unreal Engine C++ API Reference > Plugins > PlayTimeLimit
Inheritance Hierarchy
- IModularFeature
- IOnlinePlayTimeLimit
- FPlayTimeLimitImpl
References
Module | PlayTimeLimit |
Header | /Engine/Plugins/Online/OnlineFramework/Source/PlayTimeLimit/Public/PlayTimeLimitImpl.h |
Include | #include "PlayTimeLimitImpl.h" |
Syntax
class FPlayTimeLimitImpl : public IOnlinePlayTimeLimit
Remarks
Implementation of IOnlinePlayTimeLimit
Variables
Type | Name | Description | |
---|---|---|---|
![]() |
TArray< FOnlinePlayLimitConfigEntry > | ConfigRates | Configuration to control notification rate at different levels of play time |
![]() |
double | LastTickLogicTime | Last time we performed tick logic |
![]() |
FOnGameExitRequested | OnGameExitRequestedDelegate | Delegate used to request a game exit |
![]() |
OnRequestCreateUserDelegate | OnRequestCreateUser | |
![]() |
FTSTicker::FDelegateHandle | TickHandle | Delegate for callbacks to Tick |
![]() |
TArray< FPlayTimeLimitUserPtr > | Users | List of users we are monitoring |
![]() |
FWarnUserPlayTime | WarnUserPlayTimeDelegate | Delegate used to display a warning to the user about their play time |
Constructors
Type | Name | Description | |
---|---|---|---|
![]() |
Default constructor |
Destructors
Type | Name | Description | |
---|---|---|---|
![]() ![]() |
Destructor |
Functions
Type | Name | Description | |
---|---|---|---|
![]() |
void | DumpState () |
Dump state to log |
![]() |
void | ||
![]() ![]() |
FPlayTimeLimitImpl & | Get () |
Get the singleton |
![]() ![]() |
const FOnlinePlayLimitConfigEntry * | GetConfigEntry
(
const int32 PlayTimeMinutes |
Get the config entry that corresponds to the number of minutes played |
![]() |
void | Initialize () |
Initialize |
![]() |
void | MockUser
(
const FUniqueNetId& UserId, |
Override a user's play time For testing the system without needing to potentially wait hours - waiting to accumulate time and waiting for the time to reset |
![]() |
void | NotifyNow () |
Cheat function to trigger the notification to players of their play time immediately |
![]() |
void | RegisterUser
(
const FUniqueNetId& NewUser |
Register a user to monitor their play time |
![]() |
void | Shutdown () |
Shutdown |
![]() |
bool | Tick
(
float Delta |
Tick - update users and execute warn time delegates |
![]() |
void | UnregisterUser
(
const FUniqueNetId& UserId |
Unregister a user |
![]() ![]() |
void | UpdateNextNotificationTime
(
FPlayTimeLimitUser& User, |
Update the next notification time for a user based on their current play time |
Overridden from IOnlinePlayTimeLimit
Type | Name | Description | |
---|---|---|---|
![]() ![]() |
int32 | GetPlayTimeMinutes
(
const FUniqueNetId& UserId |
Get the play time in minutes for the user |
![]() ![]() |
float | GetRewardRate
(
const FUniqueNetId& UserId |
Get the reward amount multiplier for the user Expected to start at 1.0 (full rewards), and is reduced based on their play time |
![]() ![]() |
FWarnUserPlayTime & | Delegate called when a warning should be displayed to the user. See FWarnUserPlayTimeDelegate | |
![]() ![]() |
bool | HasTimeLimit
(
const FUniqueNetId& UserId |
Begin IOnlinePlayTimeLimit. |
Typedefs
Name | Description |
---|---|
FOnGameExitRequested | Delegate called when a game exit is requested |
FOnGameExitRequestedDelegate | |
OnRequestCreateUserDelegate |