Previous: Resource Manager, Up: Resource Management [Contents][Index]
This component allows both collection and expenditure of resources. If you are spending resources (value is less than 0) and you have enough, the resources will be spent and the ’Messages’ will be called. Likewise, if you are receiving resources, the messages will also be called. ’Resource Index’ refers to the specific resource we are spending or receiving. Values start at 0, meaning the first resource is 0 the second is 1 and so on. —-Messages:— ’Collect’ takes no parameter, and will send all ’Messages’ in the list when ’Resource Value’ is positive, or we have enough to cover the cost if negative. ’CollectSpecific’ takes a Floating Point parameter, indicating the gain (or cost, if negative) and otherwise executing ’Collect’ normally.
float
periodicResourceTimerIf this is greater than zero, it represents a delay between automatic collections. Make it less than or equal to zero to turn it off.
Default value: 0
List<MessageManager.ManagedMessage>
messagesThese messages will be sent when we collect the resource. Or, if we are spending resources they will be sent only if we had enough to spend.
Default value: new List<MessageManager.ManagedMessage>()
Collects the ’Resource Value’ of this Resource Receiver
Collects a specific amount of the resource of this Resource Receiver
float
periodicResourceTimerIf this is greater than zero, it represents a delay between automatic collections. Make it less than or equal to zero to turn it off.
Default value: 0
List<MessageManager.ManagedMessage>
messagesThese messages will be sent when we collect the resource. Or, if we are spending resources they will be sent only if we had enough to spend.
Default value: new List<MessageManager.ManagedMessage>()
Collects the ’Resource Value’ of this Resource Receiver
Collects a specific amount of the resource of this Resource Receiver
Previous: Resource Manager, Up: Resource Management [Contents][Index]