Interface IGoalSavedData
The ISavedData for activeGoals. There will be one pre active IGoal.
Inherited Members
Namespace: IdleKit.Framework
Assembly: cs.temp.dll.dll
Syntax
public interface IGoalSavedData : ISavedData, IInjectable
Properties
canClaim
If the IGoal can be claimed.
Declaration
bool canClaim { get; }
Property Value
Type | Description |
---|---|
Boolean |
claimed
If the IGoal has been claimed.
Declaration
bool claimed { get; }
Property Value
Type | Description |
---|---|
Boolean |
normalizedProgress
Returns the normalized current progression between [0,1]. Returns 1 if the targetProgression is not setup.
Declaration
double normalizedProgress { get; }
Property Value
Type | Description |
---|---|
Double |
progression
The current progressed amount towards this IGoal's end.
Declaration
double progression { get; }
Property Value
Type | Description |
---|---|
Double |
targetProgression
This is the target that progression tries to reach to complete the IGoal.
If the target to reach for a IGoal is not deterministic, an IGoal can serialize a generated amount here.
See IDynamicGoal.
Declaration
double targetProgression { get; }
Property Value
Type | Description |
---|---|
Double |
Methods
Ascend()
Called when the user ascend an IStage
Declaration
void Ascend()
Claim()
Called when the IGoal is claimed.
Declaration
void Claim()
Progress(Double)
Increase the current progression by value
Declaration
void Progress(double value)
Parameters
Type | Name | Description |
---|---|---|
Double | value |
SetProgression(Double)
Hard set the current progression by value
Declaration
void SetProgression(double value)
Parameters
Type | Name | Description |
---|---|---|
Double | value |
SetTargetProgression(Double)
Set the target of the IGoal
Declaration
void SetTargetProgression(double targetProgression)
Parameters
Type | Name | Description |
---|---|---|
Double | targetProgression |