public DuelRule() { BaseGame.ShowMouse = true; AIListForTank1 = new Combo("AIListForTank1", new Vector2(100, 100), 250); AIListForTank2 = new Combo("AIListForTank1", new Vector2(100, 300), 250); AIListForTank1.OnChangeSelection += new EventHandler(AIListForTank1_OnChangeSelection); AIListForTank2.OnChangeSelection += new EventHandler(AIListForTank2_OnChangeSelection); aiLoader = new AILoader(); aiLoader.AddInterAI(typeof(DuelerNoFirst)); aiLoader.AddInterAI(typeof(ManualControl)); aiLoader.AddInterAI(typeof(DuelAIModel)); aiLoader.AddInterAI(typeof(AutoShootAI)); aiLoader.InitialCompatibleAIs(typeof(IDuelAIOrderServer), typeof(AICommonServer)); foreach (string name in aiLoader.GetAIList()) { AIListForTank1.AddItem(name); AIListForTank2.AddItem(name); } btn = new TextButton("OkBtn", new Vector2(700, 500), "Begin", 0, Color.Yellow); btn.OnClick += new EventHandler(btn_OnPress); LoadResouce(); }
public FindPathRule() { BaseGame.ShowMouse = true; aiList = new Combo("AIList", new Vector2(200, 200), 300); aiList.OnChangeSelection += new EventHandler(AIList_OnChangeSelection); aiLoader = new AILoader(); aiLoader.AddInterAI(typeof(PathFinderThird)); aiLoader.AddInterAI(typeof(PathFinderSecond)); aiLoader.AddInterAI(typeof(ManualControl)); aiLoader.AddInterAI(typeof(PathFinderFirst)); aiLoader.InitialCompatibleAIs(typeof(IAIOrderServerSinTur), typeof(AICommonServer)); foreach (string name in aiLoader.GetAIList()) { aiList.AddItem(name); } btn = new TextButton("OkBtn", new Vector2(700, 500), "Begin", 0, Color.Blue); btn.OnClick += new EventHandler(btn_OnClick); }