Пример #1
0
 public GameArgs(GameArgs args)
 {
     Input    = new InputSettingsArgs(args.Input);
     Content  = new ContentManagerArgs(args.Content);
     Graphics = new GraphicsRendererArgs(args.Graphics);
     States   = new GameStateManagerArgs(args.States);
     Time     = new TimeManagerArgs(args.Time);
     Window   = new GameWindowArgs(args.Window);
     Debug    = new DebugArgs(args.Debug);
 }
Пример #2
0
        // Constructor(s)
        public GameEngine(GameArgs args)
        {
            // Copy arguments (to avoid outside editing of the arguments)
            _args = new GameArgs(args);

            // Console
            GameConsole.Initialize();

            // Content
            _content = new ContentManager(args.Content);

            // GameStates
            _states = new GameStateManager(this, args.States);

            // Graphics
            _graphics = new GraphicsRenderer();
            _graphics.SetRenderSize(args.Graphics.ResolutionWidth, args.Graphics.ResolutionHeight);

            // Input
            _input = new InputManager(args.Input);

            //
            _users = new UserManager(9001);

            // Time
            _time = new TimeManager(args.Time);

            // Window
            CreateWindow(args.Window);

            // Add Debug GameState
            if (args.Debug.Activated)
            {
                _states.AddState(new Debugging.DebugGameState(args.Debug));
            }
        }