Пример #1
0
        public override NodeTreeOutput Tick(out ExecutionResult executionResult, ExecutionResult childResult)
        {
            bool result = condition.GetValue();

            if (returnCondition.GetValue())
            {
                executionResult = result ? ExecutionResult.Success : ExecutionResult.Failure;
            }
            else
            {
                executionResult = ExecutionResult.Success;
            }
            return(result ? childTrue : childFalse);
        }
 public override void Calculate()
 {
     returnVar.value = (UnityEngine.Color.HSVToRGB(H.GetValue(), S.GetValue(), V.GetValue(), hdr.GetValue()));
 }
Пример #3
0
        public override NodeTreeOutput Tick(out ExecutionResult executionResult, ExecutionResult childResult)
        {
            if (startTime == 0)
            {
                startTime = Time.time;
            }
#if !UNITY_EDITOR
            float
#endif
            cachedSeconds = seconds.GetValue();
            if (Time.time > startTime + cachedSeconds || (Time.time == startTime && cachedSeconds <= 0 && !skipMinimumAFrame.GetValue()))
            {
                executionResult = ExecutionResult.Success;
                InterruptExecution();
                return(child);
            }
            else
            {
                executionResult = ExecutionResult.StopExecutionAtMe;
                return(null);
            }
        }
Пример #4
0
 public override void Calculate()
 {
     res.value = !a.GetValue();
 }