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
set
GoalSetThe goal set that this goal is a part of
info
GoalInfoThe 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
person
PersonLikeThe person that should make progress on this goal.
amount
floatThe amount of progress to make
speedMultiplier
floatThe game speed multiplier, which represents how fast things should happen, which is usually determined by Speed
info
ActionInfoThe action information that influences this goal's progress
skill
SkillTypeThe skill that influences this goal's progress
levelModifier
floatThe 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()