protected override void DoStart() { isDecorateeDone = false; isDecorateeSuccess = false; isLimitReached = false; Clock.AddTimer(limit, randomVariation, 0, TimeoutReached); Decoratee.Start(); }
private void checkCondition() { if (condition.Invoke()) { Clock.RemoveTimer(checkCondition); Decoratee.Start(); } }
protected override void DoStart() { if (!condition.Invoke()) { Stopped(false); } else { Decoratee.Start(); } }
protected override void DoStart() { if (!condition.Invoke()) { Clock.AddTimer(checkInterval, checkVariance, -1, checkCondition); } else { Decoratee.Start(); } }
protected override void DoStart() { if (UnityEngine.Random.value <= this.probability) { Decoratee.Start(); } else { Stopped(false); } }
protected override void DoStart() { if (Mathf.Random() <= this.probability) { Decoratee.Start(); } else { Stopped(false); } }
protected override void DoStart() { if (isReady) { isReady = false; if (!startAfterDecoratee) { Clock.AddTimer(cooldownTime, randomVariation, 0, TimeoutReached); } Decoratee.Start(); } }
private void TimeoutReached() { if (IsActive && !Decoratee.IsActive) { Clock.AddTimer(cooldownTime, randomVariation, 0, TimeoutReached); Decoratee.Start(); } else { isReady = true; } }
protected override void DoStart() { if (loopCount != 0) { currentLoop = 0; Decoratee.Start(); } else { this.Stopped(true); } }
protected override void DoStart() { if (repeatTimes != 0) { stopRequested = false; numberOfExecutions = 0; Decoratee.Start(); } else { this.Stopped(true); } }
protected override void DoStart() { if (stopsOnChange != Stops.NONE) { this.RootNode.Blackboard.AddObserver(this.key, OnValueChanged); } if (!IsConditionMet()) { Stopped(false); } else { Decoratee.Start(); } }
protected override void DoChildStopped(Node child, bool result) { if (result) { if (stopRequested || (repeatTimes > 0 && ++numberOfExecutions >= repeatTimes)) { Stopped(true); } else { Decoratee.Start(); } } else { Stopped(false); } }
protected override void DoStart() { if (this.interval <= 0f) { this.Clock.AddUpdateObserver(serviceMethod); serviceMethod(); } else if (randomVariation <= 0f) { this.Clock.AddTimer(this.interval, -1, serviceMethod); serviceMethod(); } else { InvokeServiceMethodWithRandomVariation(); } Decoratee.Start(); }
protected override void DoStart() { if (stopsOnChange != Stops.NONE) { if (!isObserving) { isObserving = true; StartObserving(); } } if (!IsConditionMet()) { Stopped(false); } else { Decoratee.Start(); } }
private void CheckQuorum() { List <Agent> confirmedList = RootNode.Blackboard.Get <List <Agent> >(type + "-confirmed"); if (quorumCount == -1) { // Check quorum list foreach (Agent agent in quorumList) { if (!confirmedList.Contains(agent)) { return; } } foreach (Agent agent in confirmedList) { agent.ReceiveReconfirmation(); } } else { // Check quorum count if (confirmedList.Count < quorumCount) { return; } int remaining = quorumCount; foreach (Agent agent in confirmedList) { agent.ReceiveReconfirmation(); remaining--; if (remaining == 0) { break; } } } Clock.RemoveTimer(CheckQuorum); Clock.RemoveTimer(QuorumNotMet); Decoratee.Start(); }
protected void restartDecoratee() { Decoratee.Start(); }
protected override void DoStart() { this.onStart(); Decoratee.Start(); }
protected override void DoStart() { this.isLimitReached = false; Clock.AddTimer(limit, randomVariation, 0, TimeoutReached); Decoratee.Start(); }
protected override void DoStart() { Decoratee.Start(); }