Class ManualProgressGoal
A manual progress goal is a Goal that is not automatically triggered. Its progress goes between 0 and 1, and can be advanced using MakeProgress(PersonLike, float, float, ActionInfo, SkillType, float).
public class ManualProgressGoal : Goal, IGenericDataHolder
- Inheritance
-
JsonTypeSafeGenericDataHolderManualProgressGoal
- Implements
-
IGenericDataHolder
- Inherited Members
-
JsonTypeSafeGenericDataHolder.GetDataKeys()
- Extension Methods
Constructors
ManualProgressGoal(GoalSet, GoalInfo)
Creates a new goal with the given settings
public ManualProgressGoal(GoalSet set, GoalInfo info)
Parameters
setGoalSetThe goal set that this goal is a part of
infoGoalInfoThe underlying goal info that this goal has been constructed from
Methods
GetProgress()
Returns the progress percentage (between 0 and 1) that this goal has
public override float GetProgress()
Returns
- float
The progress percentage
MakeProgress(PersonLike, float, float, ActionInfo, SkillType, float)
Makes progress on this manual progress goal based on the underlying PersonLike's GetEfficiencyModifier(float, ActionInfo, SkillType, float)
public void MakeProgress(PersonLike person, float amount, float speedMultiplier, ActionInfo info = null, SkillType skill = null, float levelModifier = 0.1)
Parameters
personPersonLikeThe person that should make progress on this goal.
amountfloatThe amount of progress to make
speedMultiplierfloatThe game speed multiplier, which represents how fast things should happen, which is usually determined by Speed
infoActionInfoThe action information that influences this goal's progress
skillSkillTypeThe skill that influences this goal's progress
levelModifierfloatThe amount by which each skill level influences this goal's progress
Reset()
Resets this goal to the default values, which should cause 0 to be returned on GetProgress()
public override void Reset()