public static string Inspect(BaseSystem system) { var sb = new StringBuilder(); Inspect(system, sb); return(sb.ToString()); }
public static void Inspect(BaseSystem system, StringBuilder sb, string prefix = "") { Debug.Assert(system != null); sb.Append(prefix); sb.AppendLine(system.GetType().Name); var current = system.children; while (current != null) { Inspect(current, sb, prefix + " "); current = current.sibling; } }
public override void OnMessage(BaseSystem sender, int msg, object arg1, object arg2) { Debug.LogFormat("[{0:0.00}] {1} arg1: {2} arg2: {3}", Time.time, msg, arg1, arg2); }
public ConsoleSystem(BaseSystem parent) { parent.AddChild(this); }