22 lines
520 B
C#
22 lines
520 B
C#
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;
|
|
}
|
|
} |