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

Detailed Description

visualizes a resource using canvas objects and TextMeshPro text elements check out the ManualResource scene in the AdventureManual project for an example

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

Inheritance diagram for AdventureCore.ResourceBarTMP:
AdventureCore.ResourceBarBase

Public Member Functions

override void Show ()
 
override void Hide ()
 
override void SetDescription (string description)
 
override void Damage (DamageEvent damageEvent)
 
- Public Member Functions inherited from AdventureCore.ResourceBarBase
void SetResource (ResourcePool resourcePool, ResourceType resourceType)
 

Public Attributes

RectTransform Bar
 
Image ValueImage
 
Image HitImage
 
TMPro.TMP_Text ValueText
 
TMPro.TMP_Text HitText
 
TMPro.TMP_Text DescriptionText
 
RectTransform MaximumTransform
 
- Public Attributes inherited from AdventureCore.ResourceBarBase
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

override void setup ()
 
override void onValueChanging (float value)
 
override void onValueChanged (float value)
 
override void onMaximumChanged (float value)
 
- Protected Member Functions inherited from AdventureCore.ResourceBarBase
virtual void Awake ()
 
virtual void Start ()
 
virtual void OnDestroy ()
 
virtual void attach ()
 
virtual void detach ()
 
string getValueText ()
 
string getHitText (DamageEvent damageEvent)
 

Additional Inherited Members

- Protected Attributes inherited from AdventureCore.ResourceBarBase
bool _isSetup
 
bool _isAttached
 
ResourceValue _resourceValue
 

Member Function Documentation

◆ Damage()

override void AdventureCore.ResourceBarTMP.Damage ( DamageEvent damageEvent)
inlinevirtual

Reimplemented from AdventureCore.ResourceBarBase.

◆ Hide()

override void AdventureCore.ResourceBarTMP.Hide ( )
inlinevirtual

Reimplemented from AdventureCore.ResourceBarBase.

◆ onMaximumChanged()

override void AdventureCore.ResourceBarTMP.onMaximumChanged ( float value)
inlineprotectedvirtual

Reimplemented from AdventureCore.ResourceBarBase.

◆ onValueChanged()

override void AdventureCore.ResourceBarTMP.onValueChanged ( float value)
inlineprotectedvirtual

Reimplemented from AdventureCore.ResourceBarBase.

◆ onValueChanging()

override void AdventureCore.ResourceBarTMP.onValueChanging ( float value)
inlineprotectedvirtual

Reimplemented from AdventureCore.ResourceBarBase.

◆ SetDescription()

override void AdventureCore.ResourceBarTMP.SetDescription ( string description)
inlinevirtual

Reimplemented from AdventureCore.ResourceBarBase.

◆ setup()

override void AdventureCore.ResourceBarTMP.setup ( )
inlineprotectedvirtual

Reimplemented from AdventureCore.ResourceBarBase.

◆ Show()

override void AdventureCore.ResourceBarTMP.Show ( )
inlinevirtual

Reimplemented from AdventureCore.ResourceBarBase.