mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-04-12 12:06:58 +00:00
#743 Adds SetValueFunc() to all Feedback types
This commit is contained in:
parent
c2e5bd290a
commit
e3920132bf
3 changed files with 15 additions and 1 deletions
|
|
@ -62,6 +62,11 @@ namespace PepperDash.Essentials.Core
|
|||
ValueFunc = valueFunc;
|
||||
}
|
||||
|
||||
public void SetValueFunc(Func<bool> newFunc)
|
||||
{
|
||||
ValueFunc = newFunc;
|
||||
}
|
||||
|
||||
public override void FireUpdate()
|
||||
{
|
||||
bool newValue = InTestMode ? TestValue : ValueFunc.Invoke();
|
||||
|
|
|
|||
|
|
@ -51,6 +51,12 @@ namespace PepperDash.Essentials.Core
|
|||
ValueFunc = valueFunc;
|
||||
}
|
||||
|
||||
public void SetValueFunc(Func<int> newFunc)
|
||||
{
|
||||
ValueFunc = newFunc;
|
||||
}
|
||||
|
||||
|
||||
public override void FireUpdate()
|
||||
{
|
||||
var newValue = InTestMode ? TestValue : ValueFunc.Invoke();
|
||||
|
|
|
|||
|
|
@ -52,7 +52,10 @@ namespace PepperDash.Essentials.Core
|
|||
ValueFunc = valueFunc;
|
||||
}
|
||||
|
||||
|
||||
public void SetValueFunc(Func<string> newFunc)
|
||||
{
|
||||
ValueFunc = newFunc;
|
||||
}
|
||||
|
||||
public override void FireUpdate()
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue