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

Detailed Description

special ChangingResourceValue that adds an effect when it is full and removes it when empty
typically ChangingResourceValue.Rate should be negative so the value empties on its own after being raised by some outside source

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

Inheritance diagram for AdventureCore.EffectResourceValue:
AdventureCore.ChangingResourceValue AdventureCore.ResourceValue

Public Member Functions

override bool Change (float value, Object source=null)
 
override bool ResetValue ()
 
- Public Member Functions inherited from AdventureCore.ResourceValue
virtual bool Set (float value, Object source=null)
 
virtual void SetMaximum (float value, Object source=null)
 
override string ToString ()
 

Public Attributes

EffectPool EffectPool
 
EffectType EffectType
 
- Public Attributes inherited from AdventureCore.ChangingResourceValue
float Rate
 
float Lag
 
- Public Attributes inherited from AdventureCore.ResourceValue
ResourceType Type
 
float Minimum
 
float Maximum
 
float Value
 
UnityEvent< float > Changing
 
UnityEvent< float > Changed
 
UnityEvent< float > MaximumChanged
 

Protected Member Functions

override void onValueChanged ()
 
- Protected Member Functions inherited from AdventureCore.ChangingResourceValue
override void Update ()
 
- Protected Member Functions inherited from AdventureCore.ResourceValue
virtual void Awake ()
 
virtual float applyCaps (float value)
 
virtual void onValueChanging (float newValue)
 
virtual void onMaximumChanged ()
 

Protected Attributes

EffectBase _effect
 

Properties

bool IsEffectActive [get]
 
- Properties inherited from AdventureCore.ResourceValue
float Ratio [get]
 
ResourcePool Pool [get, set]
 

Member Function Documentation

◆ Change()

override bool AdventureCore.EffectResourceValue.Change ( float value,
Object source = null )
inlinevirtual

◆ onValueChanged()

override void AdventureCore.EffectResourceValue.onValueChanged ( )
inlineprotectedvirtual

Reimplemented from AdventureCore.ResourceValue.

◆ ResetValue()

override bool AdventureCore.EffectResourceValue.ResetValue ( )
inlinevirtual

Reimplemented from AdventureCore.ResourceValue.