Пример #1
0
        /// <summary>
        /// Creates an application using the Default skin file. 
        /// </summary>
        public TheGameOfLife()
            : base(true)
        {
            _screenManager = new ScreenManager(this);
            Manager = new CustomManager(this, _screenManager);

            Content.RootDirectory = "Content";
            Manager.SkinDirectory = "Content/Skins";
            Manager.LayoutDirectory = "Content/Layouts";

            ClearBackground = true;
            BackgroundColor = Color.White;

            TargetElapsedTime = TimeSpan.FromMilliseconds(1000 / 60f);

            IsFixedTimeStep = true;
            SystemBorder = true;
            ExitConfirmation = false;

            Manager.Visible = false;
            _screenManager = new ScreenManager(this);
        }
 public CustomManager(Game game, ScreenManager screenManager)
     : base(game)
 {
     _screenManager = screenManager;
     WorldComponents = new List<Component>();
 }
Пример #3
0
        public void DependencyInjection(ScreenManager screenManager)
        {
            ScreenManager = screenManager;

            Application = screenManager.Application;
            Content = Application.Content;
            ControlManager = new GameLayerManager(Application.Manager as CustomManager);
        }