private static void Readout( string text, IHasBehaviorEvent[] events, params IHasBehaviorObject[] objects) { string output = text + "\n\n"; foreach (IHasBehaviorObject obj in objects) { output += obj.Behavior.Token.ToString() + ": " + obj.Behavior.Status; output += " C: "; if (obj.Behavior.CurrentEvent == null) output += "(null)"; else output += obj.Behavior.CurrentEvent.Token; output += " P: "; if (obj.Behavior.PendingEvent == null) output += "(null)"; else output += obj.Behavior.PendingEvent.Token; output += "\n"; } foreach (IHasBehaviorEvent evt in events) output += evt.Behavior.Token.ToString() + ": " + evt.Behavior.Status + "\n"; Debug.Log(output); }
private void Tick( int count, IHasBehaviorEvent[] events, params IHasBehaviorObject[] objects) { for (int i = 0; i < count; i++) { BehaviorManager.Instance.Update(Time.fixedDeltaTime); Readout("Tick " + this.ticks++ + " results", events, objects); } }