Loading...
Searching...
No Matches
AdventureCore.ResourceBarBase Class Referenceabstract

Detailed Description

base class for a bar that visualizes a character resource
when the resource gets damaged it can show the damage value for a configurable duration
check out the ManualResource scene in the AdventureManual project for examples

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

Inheritance diagram for AdventureCore.ResourceBarBase:
AdventureCore.ResourceBarElement AdventureCore.ResourceBarPanel AdventureCore.ResourceBarTMP

Public Member Functions

void SetResource (ResourcePool resourcePool, ResourceType resourceType)
 
virtual void Show ()
 
virtual void Hide ()
 
virtual void SetDescription (string description)
 
virtual void Damage (DamageEvent damageEvent)
 

Public Attributes

Transform Target
 
string Format
 
string HitFormat
 
ResourceType ResourceType
 
ResourcePool ResourcePool
 
float HitDuration
 
bool Fade = true
 
bool ShowDamageColor
 
bool HideWhenEmpty
 
float MaximumReference
 
UnityEvent Damaged
 

Protected Member Functions

virtual void Awake ()
 
virtual void Start ()
 
virtual void OnDestroy ()
 
virtual void setup ()
 
virtual void attach ()
 
virtual void detach ()
 
virtual void onValueChanging (float value)
 
virtual void onValueChanged (float value)
 
virtual void onMaximumChanged (float value)
 
string getValueText ()
 
string getHitText (DamageEvent damageEvent)
 

Protected Attributes

bool _isSetup
 
bool _isAttached
 
ResourceValue _resourceValue