27 lines
528 B
C#
27 lines
528 B
C#
|
using BehaviorDesigner.Runtime;
|
||
|
using BehaviorDesigner.Runtime.Tasks;
|
||
|
|
||
|
// ReSharper disable once CheckNamespace
|
||
|
namespace BlueWaterProject
|
||
|
{
|
||
|
[TaskCategory("Common")]
|
||
|
public class SetSharedIntPlus : Action
|
||
|
{
|
||
|
[RequiredField]
|
||
|
public SharedInt targetVariable;
|
||
|
|
||
|
public override TaskStatus OnUpdate()
|
||
|
{
|
||
|
targetVariable.Value++;
|
||
|
|
||
|
return TaskStatus.Success;
|
||
|
}
|
||
|
|
||
|
public override void OnReset()
|
||
|
{
|
||
|
targetVariable = 0;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|