Table of Contents

Class Need

Namespace
TinyLife
Assembly
Tiny Life.dll

A need is a desire that a Person can have to a given extent, defined by Value. Each need is instantiated through its associated NeedType.

[DataContract]
public class Need
Inheritance
Need
Inherited Members
Extension Methods

Constructors

Need(NeedType)

Instantiate a new need from the given NeedType

public Need(NeedType type)

Parameters

type NeedType

The type to instantiate the need from

Fields

Max

The maximum value that the Value can have

public const float Max = 100000

Field Value

float

Type

The NeedType that this need instance originates from

[DataMember]
public readonly NeedType Type

Field Value

NeedType

Properties

Percentage

The Value divided by Max, yielding a floating point number between 0 and 1, representing the percentage fullness of this need

public float Percentage { get; }

Property Value

float

Value

The current value of this need. Automatically gets clamped to a number between 0 and Max.

[DataMember]
public float Value { get; set; }

Property Value

float