Loading...
Searching...
No Matches
AdventureCore.ResourcePoolSurrogate Class Reference

Detailed Description

placeholder that redirects to an actual component when a character with a specified id is available
can be used to bind things like UI to components of characters that will spawn during gameplay

https://adventure.softleitner.com/manual/resource

Inheritance diagram for AdventureCore.ResourcePoolSurrogate:
AdventureCore.ResourcePool

Public Member Functions

override ResourcePool GetRootPool ()
 
override bool ContainsResource (ResourceType resourceType)
 
override bool ClearResource (ResourceType resourceType, Object source)
 
override void ResetResources ()
 
override ResourceValue GetResourceValue (ResourceType resource)
 
override bool HasValue (ResourceType resource)
 
- Public Member Functions inherited from AdventureCore.ResourcePool
void Initialize ()
 
bool HasResourceQuantity (ResourceQuantity resourceQuantity)
 
bool HasResourceQuantity (IEnumerable< ResourceQuantity > resourceQuantities)
 
bool HasAnyResource (ResourceType resourceType)
 
bool HasAnyResource (IEnumerable< ResourceType > resourceTypes)
 
bool HasAnyResource (IEnumerable< ResourceQuantity > resourceQuantities)
 
bool FillResource (ResourceType resourceType, Object source)
 
bool AddResource (ResourceType resourceType, float value, Object source)
 
bool AddResource (ResourceQuantity resourceQuantity, Object source)
 
bool RemoveResource (ResourceType resourceType, float value, Object source)
 
bool RemoveResource (ResourceQuantity resourceQuantity, Object source)
 
void AddResources (IEnumerable< ResourceQuantity > resources, Object source)
 
void RemoveResources (IEnumerable< ResourceQuantity > resources, Object source)
 
void AddResources (IEnumerable< ResourceQuantity > resources)
 
void RemoveResources (IEnumerable< ResourceQuantity > resources)
 
bool FillResource (ResourceType resourceType)
 
bool AddResource (ResourceQuantity resourceQuantity)
 
bool RemoveResource (ResourceQuantity resourceQuantity)
 
bool ClearResource (ResourceType resourceType)
 
float GetValue (ResourceType resource)
 
float GetMaximum (ResourceType resource)
 
float GetRatio (ResourceType resource)
 
virtual ResourceData GetData ()
 
void OnResourceChanged (ResourceValue resourceValue)
 
void Retrieve ()
 
void Persist ()
 

Public Attributes

string CharacterId
 
- Public Attributes inherited from AdventureCore.ResourcePool
PersisterBase Persister
 
float PersistenceInterval = 1f
 
Transform BarTarget
 
ResourceValue[] Values
 
UnityEvent< ResourceValueChanged
 

Additional Inherited Members

- Static Public Attributes inherited from AdventureCore.ResourcePool
const string PERSISTENCE_SUB_KEY = "RES"
 
- Properties inherited from AdventureCore.ResourcePool
bool IsInitialized [get]
 

Member Function Documentation

◆ ClearResource()

override bool AdventureCore.ResourcePoolSurrogate.ClearResource ( ResourceType resourceType,
Object source )
virtual

Reimplemented from AdventureCore.ResourcePool.

◆ ContainsResource()

override bool AdventureCore.ResourcePoolSurrogate.ContainsResource ( ResourceType resourceType)
virtual

Reimplemented from AdventureCore.ResourcePool.

◆ GetResourceValue()

override ResourceValue AdventureCore.ResourcePoolSurrogate.GetResourceValue ( ResourceType resource)
virtual

Reimplemented from AdventureCore.ResourcePool.

◆ GetRootPool()

override ResourcePool AdventureCore.ResourcePoolSurrogate.GetRootPool ( )
virtual

Reimplemented from AdventureCore.ResourcePool.

◆ HasValue()

override bool AdventureCore.ResourcePoolSurrogate.HasValue ( ResourceType resource)
virtual

Reimplemented from AdventureCore.ResourcePool.

◆ ResetResources()

override void AdventureCore.ResourcePoolSurrogate.ResetResources ( )
virtual

Reimplemented from AdventureCore.ResourcePool.