using DragonLi.EventFlow; using UnityEngine; namespace DragonLi.Examples { public class RandomInt : ConditionUnit { private int min; private int max; [AsInput("Min", ParameterTpyes.Int)] public void GetMin(object min) { this.min = (int)min; } [AsInput("Max", ParameterTpyes.Int)] public void GetMax(object max) { this.max = (int)max; } /// /// This will be called when some node wants the result /// /// protected override int OnCondition() { return Random.Range(min, max + 1); } } }