rj-action-library/Runtime/GameObjects/Variables/Int/ChangeIntVariable.cs

33 lines
469 B
C#

using System.Diagnostics;
using System.Collections;
using System.Collections.Generic;
using System;
using Godot;
using System.Linq;
namespace Rokojori
{
[Tool]
[GlobalClass ]
public partial class ChangeIntVariable:Action
{
[Export]
public IntVariable variable;
[Export]
public int num;
protected override void _OnTrigger()
{
if ( variable == null )
{
return;
}
variable.value += num;
}
}
}