first commit
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
using NodeCanvas.Framework;
|
||||
using ParadoxNotion.Design;
|
||||
using UnityEngine;
|
||||
|
||||
namespace NodeCanvas.Tasks.Actions
|
||||
{
|
||||
|
||||
[Category("✫ Blackboard")]
|
||||
[Description("Set a blackboard float variable at random between min and max value")]
|
||||
public class SetFloatRandom : ActionTask
|
||||
{
|
||||
|
||||
public BBParameter<float> minValue;
|
||||
public BBParameter<float> maxValue;
|
||||
|
||||
[BlackboardOnly]
|
||||
public BBParameter<float> floatVariable;
|
||||
|
||||
protected override string info {
|
||||
get { return "Set " + floatVariable + " Random(" + minValue + ", " + maxValue + ")"; }
|
||||
}
|
||||
|
||||
protected override void OnExecute() {
|
||||
floatVariable.value = Random.Range(minValue.value, maxValue.value);
|
||||
EndAction();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user