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 Maximum
 
float Value
 
UnityEvent< float > Changed
 
UnityEvent< float > MaximumChanged
 

Protected Member Functions

override float applyCaps (float value)
 
override void onValueChanged ()
 
- Protected Member Functions inherited from AdventureCore.ChangingResourceValue
override void Update ()
 
- Protected Member Functions inherited from AdventureCore.ResourceValue
virtual void Awake ()
 
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

◆ applyCaps()

override float AdventureCore.EffectResourceValue.applyCaps ( float value)
inlineprotectedvirtual

Reimplemented from AdventureCore.ResourceValue.

◆ 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.