Interface IUserSavedData
ISavedData for the Player/User not related to any IEntity. This can be used to store all player preference in the future.
Namespace: IdleKit.Gameplay
Assembly: cs.temp.dll.dll
Syntax
public interface IUserSavedData : ICloudSavedData, ISavedData
Properties
AvatarId
Id of the Avatar the player is currently using. The Avatar is normally used when displaying leaderboards.
Declaration
string AvatarId { get; }
Property Value
Type | Description |
---|---|
String |
ContentId
The Id of the currently active IContent. This can be used to identify persistent data across the various IContent it appears in.
Declaration
string ContentId { get; set; }
Property Value
Type | Description |
---|---|
String |
EventSettingsId
The Id of the currently active IEventContent.
Declaration
string EventSettingsId { get; }
Property Value
Type | Description |
---|---|
String |
IsNew
Returns true if this is a new player. useful for showing intros, tutorials and other similar content
Declaration
bool IsNew { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
Methods
GetAvatarId()
Returns player's current Avatar id.
Declaration
string GetAvatarId()
Returns
Type | Description |
---|---|
String | Returns an avatar id as a String |
GetLastActivityTime()
Get the timestamp of the last user activity in the current IContent specified by ContentId. Each IContent has its own last user activity timestamp.
Declaration
long GetLastActivityTime()
Returns
Type | Description |
---|---|
Int64 | Return the last activity timestamp, 0 if not found. |
SetAvatarId(String)
Sets the String id for the Avatar that the player uses. The Avatar is normally used when displaying leaderboards.
Declaration
void SetAvatarId(string avatarId)
Parameters
Type | Name | Description |
---|---|---|
String | avatarId |
SetLastActivityTime(Int64)
Set the timestamp of the last user activity in the current IContent specified by ContentId. Each IContent has its own last user activity timestamp.
This function does not set any timestamp if ContentId is null or empty.
Declaration
void SetLastActivityTime(long timestamp)
Parameters
Type | Name | Description |
---|---|---|
Int64 | timestamp |