Exemplo n.º 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()));
 }
Exemplo n.º 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);
            }
        }
Exemplo n.º 4
0
 public override void Calculate()
 {
     res.value = !a.GetValue();
 }