blob: e16fb31a5552114fcc583f54012ee2ddda5c4aec (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
namespace BehaviorDesigner.Runtime.Tasks.Basic.Math
{
[TaskCategory("Basic/Math")]
[TaskDescription("Sets an int value")]
public class SetInt : Action
{
[Tooltip("The int value to set")]
public SharedInt intValue;
[Tooltip("The variable to store the result")]
public SharedInt storeResult;
public override TaskStatus OnUpdate()
{
storeResult.Value = intValue.Value;
return TaskStatus.Success;
}
public override void OnReset()
{
intValue.Value = 0;
storeResult.Value = 0;
}
}
}
|