コード例 #1
0
ファイル: Game1.cs プロジェクト: ZachPeterson/Spectrum
        public Game1()
        {
            this.Window.Title = "Spectrum";
            graphics = new GraphicsDeviceManager(this);
            Content.RootDirectory = "Content";
            graphics.PreferredBackBufferHeight = 720;
            graphics.PreferredBackBufferWidth = 1280;
            aaDisplay = new Display(this);
            mManager = new StateManager();
            mGame = new State_GameState(this);
            mSplash = new State_SplashState(this);
            mMainMenu = new State_Menu_Main(this);
            mShipMenu = new State_Menu_Ship(this);
            mInstructionsMenu = new State_Menu_Instructions(this);
            mHighScoreMenu = new State_Menu_HighScore(this);
            aaHSManager = new GameIO();
            mGameSoundFX = new List<SoundEffectInstance>();
            mGameSoundFXRemove = new List<SoundEffectInstance>();

            this.IsMouseVisible = true;

            Int64 performanceFrequency = 0;
            PerformanceTimer.QueryPerformanceFrequency(out performanceFrequency);
            secondsPerCount = 1.0f / (float)performanceFrequency;
            PerformanceTimer.QueryPerformanceCounter(out currentTimeStamp);
            previousTimeStamp = currentTimeStamp;
        }
コード例 #2
0
ファイル: Game1.cs プロジェクト: ZachPeterson/Spectrum
        public Game1()
        {
            this.Window.Title     = "Spectrum";
            graphics              = new GraphicsDeviceManager(this);
            Content.RootDirectory = "Content";
            graphics.PreferredBackBufferHeight = 720;
            graphics.PreferredBackBufferWidth  = 1280;
            aaDisplay          = new Display(this);
            mManager           = new StateManager();
            mGame              = new State_GameState(this);
            mSplash            = new State_SplashState(this);
            mMainMenu          = new State_Menu_Main(this);
            mShipMenu          = new State_Menu_Ship(this);
            mInstructionsMenu  = new State_Menu_Instructions(this);
            mHighScoreMenu     = new State_Menu_HighScore(this);
            aaHSManager        = new GameIO();
            mGameSoundFX       = new List <SoundEffectInstance>();
            mGameSoundFXRemove = new List <SoundEffectInstance>();

            this.IsMouseVisible = true;

            Int64 performanceFrequency = 0;

            PerformanceTimer.QueryPerformanceFrequency(out performanceFrequency);
            secondsPerCount = 1.0f / (float)performanceFrequency;
            PerformanceTimer.QueryPerformanceCounter(out currentTimeStamp);
            previousTimeStamp = currentTimeStamp;
        }