Files
BH3/Assets/Scripts/Assembly-CSharp/MoleMole/SharedFloatLogic.cs
2025-08-13 09:26:42 +08:00

36 lines
596 B
C#

using BehaviorDesigner.Runtime;
using BehaviorDesigner.Runtime.Tasks;
namespace MoleMole
{
[TaskCategory("Basic/SharedVariable")]
public class SharedFloatLogic : Action
{
public enum LogicType
{
Add = 0,
Multiple = 1
}
public SharedFloat BaseValue;
public LogicType Logic;
public SharedFloat ParamValue;
public override TaskStatus OnUpdate()
{
switch (Logic)
{
case LogicType.Add:
BaseValue.Value += ParamValue.Value;
break;
case LogicType.Multiple:
BaseValue.Value *= ParamValue.Value;
break;
}
return TaskStatus.Success;
}
}
}