Class Need
- Namespace
- TinyLife
- Assembly
- Tiny Life.dll
A need is a desire that a PersonLike 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
NeedTypeThe type to instantiate the need from
Fields
Max
The maximum value that the Value can have
public const float Max = 100000
Field Value
Type
The NeedType that this need instance originates from
[DataMember]
public readonly NeedType Type
Field Value
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
Value
The current value of this need. Automatically gets clamped to a number between 0 and Max.
[DataMember]
public float Value { get; set; }