Interface IEventSettings
The IEventSettings is used to map IRewards between an IEventContents IMilestones and another IContent.
It is recommended that this data be globally accessible in all IContent to reduce the risk of save or IReward claiming issues. Using this global mapping across IContent allows for only one set of IContent and associated data to be loaded at a time.
Inherited Members
Namespace: IdleKit.Framework
Assembly: cs.temp.dll.dll
Syntax
public interface IEventSettings : IEntity, IInjectable
Properties
eventSettingsData
Returns the IEventSettingsData associated with this IEventSettings.
Declaration
IEventSettingsData eventSettingsData { get; }
Property Value
Type | Description |
---|---|
IEventSettingsData |
eventSettingsSavedData
Returns the IMilestoneSavedData associated with this IEventSettings.
Declaration
IEventSettingsSavedData eventSettingsSavedData { get; }
Property Value
Type | Description |
---|---|
IEventSettingsSavedData |
isActive
Returns whether the associated IEventContent is currently active.
Declaration
bool isActive { get; }
Property Value
Type | Description |
---|---|
Boolean |
timeRemaining
Returns the time remaining in milliseconds. Returns 0 if IEventContent is not active.
Declaration
long timeRemaining { get; }
Property Value
Type | Description |
---|---|
Int64 |
Methods
CanClaimRewards(String)
Returns true if criteria for claiming IEventContent rewards are met.
Declaration
bool CanClaimRewards(string claimInContentId)
Parameters
Type | Name | Description |
---|---|---|
String | claimInContentId | The current IContent id. |
Returns
Type | Description |
---|---|
Boolean |
CanCompleteMilestone(IMilestone)
Returns true if the
Declaration
bool CanCompleteMilestone(IMilestone milestone)
Parameters
Type | Name | Description |
---|---|---|
IMilestone | milestone | The IMilestone. |
Returns
Type | Description |
---|---|
Boolean | Return false if the |
Remarks
This method should only be called when the milestone
is loaded and in an
IEventContent.
CanCompleteMilestone(String)
Declaration
[Obsolete("Deprecated in version 1.3, use CanCompleteMilestone(IMilestone) instead.", true)]
bool CanCompleteMilestone(string milestoneId)
Parameters
Type | Name | Description |
---|---|---|
String | milestoneId |
Returns
Type | Description |
---|---|
Boolean |
ClaimRewards(String)
Claims any rewards that the player met the criteria for claiming.
Declaration
void ClaimRewards(string claimInContentId)
Parameters
Type | Name | Description |
---|---|---|
String | claimInContentId | The current IContent id. |
EndEvent(Int64)
Ends the associated IEventContent immediately, sets isComplete to true,
and sets timeCompletedTimestamp to timestamp
.
If the player earned any IMilestone related IReward it can be claimed in the IContent
with claimInContentId.
Declaration
void EndEvent(long timestamp)
Parameters
Type | Name | Description |
---|---|---|
Int64 | timestamp | The timestamp in milliseconds that the IEventContent ended. |
GetMilestoneCompletionInfo(String)
Get the MilestoneCompletionInfo associated with the milestoneId
. Returns
null if the MilestoneCompletionInfo is not found.
Declaration
MilestoneCompletionInfo GetMilestoneCompletionInfo(string milestoneId)
Parameters
Type | Name | Description |
---|---|---|
String | milestoneId |
Returns
Type | Description |
---|---|
MilestoneCompletionInfo |
GetRewardIds()
Returns a list of IReward ids that the player met the criteria for claiming.
Declaration
string[] GetRewardIds()
Returns
Type | Description |
---|---|
String[] |
SetEventEndTime(Int64)
Sets the end time of the IEventContent. timeCompletedTimestamp. Setting an end time in the past will cause the event to end immediately.
Declaration
void SetEventEndTime(long timestamp)
Parameters
Type | Name | Description |
---|---|---|
Int64 | timestamp | The timestamp in milliseconds that the IEventContent will end. |
Remarks
If SetEventEndTime(Int64) is called while the event is active, it is recommended that the game is restarted to avoid UI issues.
SetMilestoneCompletionTime(IMilestone, Int64)
Completes a IMilestone at a specific time. Useful for forecasting future completion times.
Declaration
void SetMilestoneCompletionTime(IMilestone milestone, long timestampInMilliseconds)
Parameters
Type | Name | Description |
---|---|---|
IMilestone | milestone | The IMilestone to complete. |
Int64 | timestampInMilliseconds | The timestamp in milliseconds at which the IMilestone was or will be completed. |
Remarks
This method should only be called when the milestone
is loaded and in an
IEventContent.
SetMilestoneCompletionTime(String, Int64)
Declaration
[Obsolete("Deprecated in version 1.3, use SetMilestoneCompletionTime(IMilestone, long) instead.", true)]
void SetMilestoneCompletionTime(string milestoneId, long timestampInMilliseconds)
Parameters
Type | Name | Description |
---|---|---|
String | milestoneId | |
Int64 | timestampInMilliseconds |
StartEvent(Int64, Int64)
Starts the associated IEventContent. timeStartedTimestamp.
Declaration
void StartEvent(long startTimestamp, long endTimestamp)
Parameters
Type | Name | Description |
---|---|---|
Int64 | startTimestamp | The timestamp in milliseconds that the IEventContent started. This should be the current timestamp and not a time in the future. |
Int64 | endTimestamp | The timestamp in milliseconds that the IEventContent will end. |