public static void Main(string[] args) { InitBehaviac(); bool bint = InitPlayer(); if (bint) { Task.Queue(() => { UpdateLoop(); }, 10); while (status == behaviac.EBTStatus.BT_RUNNING) { int key = Console.Read(); if (key == (int)'2') { Loger.Log("FireEvent event_task"); firstAgent.FireEvent("event_task", 2); } } CleanPlayer(); } CleanupBehaviac(); Console.Read(); Console.Read(); }
static void UpdateLoop() { Console.WriteLine("UpdateLoop"); behaviac.EBTStatus status = g_FirstAgent.btexec(); Debug.Assert(status == behaviac.EBTStatus.BT_RUNNING); g_FirstAgent.FireEvent("event_task", 2); }
static void UpdateLoop() { Console.WriteLine("UpdateLoop"); int frames = 0; behaviac.EBTStatus status = behaviac.EBTStatus.BT_RUNNING; while (status == behaviac.EBTStatus.BT_RUNNING) { Console.WriteLine("frame {0}", ++frames); status = g_FirstAgent.btexec(); g_FirstAgent.FireEvent("event_task", 2); } }