✨ Added VariableGetter functionality and some Variable setting components. Also added them to test scene.
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
using Godot;
|
||||
|
||||
namespace Babushka.scripts.CSharp.Low_Code.Variables.VariantValueChanger;
|
||||
|
||||
public partial class VariantIncrementor : Node
|
||||
{
|
||||
[Export] private VariableResource _resource;
|
||||
|
||||
public void Increment()
|
||||
{
|
||||
int integerValue = _resource.Payload.AsInt32();
|
||||
integerValue++;
|
||||
_resource.Payload = integerValue;
|
||||
}
|
||||
|
||||
public void Decrement()
|
||||
{
|
||||
int integerValue = _resource.Payload.AsInt32();
|
||||
integerValue--;
|
||||
_resource.Payload = integerValue;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user