Esempio n. 1
0
        public LoopGame()
            : base()
        {
            Instance = this;
#if !WPF
            graphics = new GraphicsDeviceManager(this);
#endif
            viewport = new OpenFeasyo.GameTools.Screen(
                graphics.PreferredBackBufferWidth, graphics.PreferredBackBufferHeight);

            _gameObjects = new PreDefinedDictionary <Vector3>(new string[] { "PlayerPosition", "Objects" }, Vector3.Zero);
            _gameStream  = new PreDefinedDictionary <double>(new string[] { }, 0.0);
            _gameEvents  = new ConcurrentQueue <short>();

            MENU_BUTTON_FONT_SIZE = new int[] { 12, 24, 36, 48, 64 }[viewport.FontSize];
        }
Esempio n. 2
0
        public GhostlyGame()
        {
            Instance = this;
            graphics = new GraphicsDeviceManager(this);
            //graphics.PreferredBackBufferWidth = 1900;
            //graphics.PreferredBackBufferHeight = 1000;

            Content.RootDirectory = "Content";
            _contentRepository    = new ContentRepository(this);

            viewport = new OpenFeasyo.GameTools.Screen(
                graphics.PreferredBackBufferWidth, graphics.PreferredBackBufferHeight);

            _gameEvents  = new ConcurrentQueue <short>();
            _gameObjects = new PreDefinedDictionary <Vector3>(new string[] { "PlayerPosition" }, Vector3.Zero);
            _gameStream  = new PreDefinedDictionary <double>(new string[] { }, 0);

            MENU_BUTTON_FONT_SIZE = new int [] { 12, 24, 36, 48, 64 }[viewport.FontSize];
            //screen.GameStarted += Screen_GameStarted;
            //screen.GameFinished += Screen_GameFinished;
            //pauseScreenKey = new KeyTracker(Keys.Space, (o, i) => { screen.Pause(); });
        }