Пример #1
0
        public EngineContext(EngineProcess engine)
        {
            throw new NotImplementedException();
            //Engine = engine;

            //Construct ();
        }
Пример #2
0
        public void Launch(EngineSettings settings)
        {
            Console.WriteLine("=====================");
            Console.WriteLine("Launching Game Engine");
            Console.WriteLine("=====================");



            // TODO: Should this be dependent on "verbose" flag?
            //Console.WriteDebugLine ("Engine ID: " + engineId);

            var context = EngineContext.New(settings);

            context.Settings.OutputType = ConsoleOutputType.Game;

            context.PopulateFromSettings();

            context.AddCompleteLogic();

            context.Initialize();
            //EngineProcess engine = null; // TODO: Remove if not needed
            try
            {
                using (var engine = new EngineProcess(context))
                {
                    engine.Run();
                }
            }
            catch (GameException ex) {
                context.Console.WriteDebugLine(ex.Message);
            }
            //finally {
            //	if (engine != null)
            //		engine.Dispose ();
        }
Пример #3
0
 public void AttachProcess(EngineProcess process)
 {
     Engine = process;
 }
Пример #4
0
        public EngineProcess CreateProcess(EngineContext context)
        {
            var process = new EngineProcess(context);

            return(process);
        }