Holds an integer that a quest can use to track a value. More...
Public Member Functions | |
QuestCounter () | |
QuestCounter (StringField name, int currentValue, int minValue, int maxValue, QuestCounterUpdateMode updateMode) | |
void | SetRuntimeReferences (Quest quest) |
void | InitializeToRandomValue () |
void | SetValue (int newValue, QuestCounterSetValueMode setValueMode=QuestCounterSetValueMode.InformListeners) |
void | SetListeners (bool enable) |
void | OnMessage (MessageArgs messageArgs) |
Handles a message that the message handler is listening for. | |
Properties | |
StringField | name [get, set] |
Quest counter name. | |
int | currentValue [get, set] |
Current value. | |
bool | randomizeInitialValue [get, set] |
Initialize the current value to a random value between min and max value. | |
int | minValue [get, set] |
Min value. | |
int | maxValue [get, set] |
Max value. | |
QuestCounterUpdateMode | updateMode [get, set] |
How this counter updates its value. | |
List< QuestCounterMessageEvent > | messageEventList [get, set] |
When updateMode is Messages, these message events affect the counter value. | |
Events | |
QuestCounterParameterDelegate | changed = delegate { } |
Holds an integer that a quest can use to track a value.
Counters can be updated by messages (e.g., "Kill"+"Orc") or a DataSynchronizer. When the value changes, the counter invokes a changed event.
|
inline |
|
inline |
|
inline |
|
inline |
Handles a message that the message handler is listening for.
messageArgs | The message that was sent to the MessageSystem. |
Implements PixelCrushers.IMessageHandler.
|
inline |
|
inline |
|
inline |
|
getset |
Current value.
When you set this property, it notifies listeners.
|
getset |
Max value.
|
getset |
When updateMode is Messages, these message events affect the counter value.
|
getset |
Min value.
|
getset |
Quest counter name.
|
getset |
Initialize the current value to a random value between min and max value.
|
getset |
How this counter updates its value.
QuestCounterParameterDelegate PixelCrushers.QuestMachine.QuestCounter.changed = delegate { } |