Table of Contents

Class ManualProgressGoal

Namespace
TinyLife.Goals
Assembly
Tiny Life.dll

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
JsonTypeSafeGenericDataHolder
ManualProgressGoal
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 GoalSet

The goal set that this goal is a part of

info GoalInfo

The 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 PersonLike

The person that should make progress on this goal.

amount float

The amount of progress to make

speedMultiplier float

The game speed multiplier, which represents how fast things should happen, which is usually determined by Speed

info ActionInfo

The action information that influences this goal's progress

skill SkillType

The skill that influences this goal's progress

levelModifier float

The 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()