Ejemplo n.º 1
0
        private void bRunAgent_Click(object sender, EventArgs e)
        {
            //Thread t = new Thread(() =>
            //    {
            Game1 game = StaticData.EngineManager.Game1;

            PairCTP.Sort(PairCTPComparator);
            GenSimAgentWrapper agent = new GenSimAgentWrapper(this.PairCTP, 20, false);

            agent.ScatterComps();

            StaticData.EngineManager.Game1 = game;
            if (agent.WAgent.IsSuccess)
            {
                LevelBuilder.CreateRestedLevel(agent.WAgent.LevelStr, false);
                CTRLevelDesigner.SaveEngineState();
                StaticData.GameSessionMode = SessionMode.PlayingMode;
                LivePlayabilitySimulator simulator = new LivePlayabilitySimulator(StaticData.EngineManager);
                simulator.SimulateSameWindow(agent.WAgent.Actions);
            }
            else
            {
                MessageBox.Show("Max number of try is reached. Run the agent again.");
            }

            //});
            //t.Start();
        }
Ejemplo n.º 2
0
 private void bCheckPlayabilty_Click(object sender, EventArgs e)
 {
     try
     {
         RYSEGenManager.SimulatePlayabiltityFromDesigner();
         SaveEngineState();
         try
         {
             if (DesignEnhanceManager.PlayabilityActions != String.Empty)
             {
                 LevelBuilder.CreateRestedLevel(DesignEnhanceManager.GevaLevel, false);
                 //RYSEManager manager = new RYSEManager(10);
                 //manager.IsSaveImage = false;
                 StaticData.GameSessionMode = SessionMode.PlayingMode;
                 //EngineShotsManager.ShowXNAWindow();
                 LivePlayabilitySimulator simulator = new LivePlayabilitySimulator(StaticData.EngineManager);
                 simulator.SimulateSameWindow(new ActionsGenerator(DesignEnhanceManager.PlayabilityActions).Actions);
             }
         }
         catch (Exception)
         {
         }
     }
     catch (Exception)
     {
     }
 }