Esempio n. 1
0
 public void Update(MyBehaviorTreeDecoratorNodeMemory.LogicMemory logicMemory)
 {
     MyBehaviorTreeDecoratorNodeMemory.CounterLogicMemory memory = logicMemory as MyBehaviorTreeDecoratorNodeMemory.CounterLogicMemory;
     if (memory.CurrentCount == this.CounterLimit)
     {
         memory.CurrentCount = 0;
     }
     else
     {
         memory.CurrentCount++;
     }
 }
Esempio n. 2
0
 public void Update(MyBehaviorTreeDecoratorNodeMemory.LogicMemory logicMemory)
 {
     MyBehaviorTreeDecoratorNodeMemory.TimerLogicMemory memory = logicMemory as MyBehaviorTreeDecoratorNodeMemory.TimerLogicMemory;
     if ((((Stopwatch.GetTimestamp() - memory.CurrentTime) / Stopwatch.Frequency) * 0x3e8L) <= this.TimeInMs)
     {
         memory.TimeLimitReached = false;
     }
     else
     {
         memory.CurrentTime      = Stopwatch.GetTimestamp();
         memory.TimeLimitReached = true;
     }
 }
Esempio n. 3
0
        public void Update(MyBehaviorTreeDecoratorNodeMemory.LogicMemory logicMemory)
        {
            var memory = logicMemory as MyBehaviorTreeDecoratorNodeMemory.CounterLogicMemory;

            if (memory.CurrentCount == CounterLimit)
            {
                memory.CurrentCount = 0;
            }
            else
            {
                ++memory.CurrentCount;
            }
        }
        public bool CanRun(MyBehaviorTreeDecoratorNodeMemory.LogicMemory logicMemory)
        {
            var memory = logicMemory as MyBehaviorTreeDecoratorNodeMemory.TimerLogicMemory;

            return(memory.TimeLimitReached);
        }
Esempio n. 5
0
 public bool CanRun(MyBehaviorTreeDecoratorNodeMemory.LogicMemory logicMemory) =>
 ((logicMemory as MyBehaviorTreeDecoratorNodeMemory.CounterLogicMemory).CurrentCount == this.CounterLimit);
Esempio n. 6
0
 public bool CanRun(MyBehaviorTreeDecoratorNodeMemory.LogicMemory logicMemory) =>
 (logicMemory as MyBehaviorTreeDecoratorNodeMemory.TimerLogicMemory).TimeLimitReached;
Esempio n. 7
0
        public bool CanRun(MyBehaviorTreeDecoratorNodeMemory.LogicMemory logicMemory)
        {
            var memory = logicMemory as MyBehaviorTreeDecoratorNodeMemory.CounterLogicMemory;

            return(memory.CurrentCount == CounterLimit);
        }