Exemplo n.º 1
0
        public KossGame()
        {
            mGraphics = new GraphicsDeviceManager(this);
            Settings.ReadSettings();
            Language.CurrentLanguage();
            if (Settings.Dict["Fullscreen"] != "on")
            {
                ScreenSize.CurrentSize(mGraphics);
            }

            Content.RootDirectory = "Content";
        }
Exemplo n.º 2
0
        /// <summary>
        /// Allows the game to perform any initialization it needs to before starting to run.
        /// This is where it can query for any required services and load any non-graphic
        /// related content.  Calling base.Initialize will enumerate through any components
        /// and initialize them as well.
        /// </summary>
        protected override void Initialize()
        {
            ExitWrapper.Init(this);
            mGraphics.GraphicsProfile = GraphicsProfile.HiDef;

            if (Settings.Dict["Fullscreen"] == "on")
            {
                ScreenSize.CurrentSize(mGraphics);
            }
            else
            {
                mGraphics.ApplyChanges();
            }
            IsMouseVisible = false;
            mCamera        = new Camera(mGraphics)
            {
                Position = AMainMenuPage.sCameraPosition
            };
            CameraWrapper.Init(mCamera);
            Globals.GetResolution(mGraphics);
            mInputManager = new InputManager(Content);
            mInputManager.GetCam(mCamera);
            ExitWrapper.LoadInputManager(mInputManager);
            CameraWrapper.LoadInputManager(mInputManager);
            ModelManager.Initialize(mGraphics.GraphicsDevice, Content, mCamera);
            AKi.LoadInputManager(mInputManager);
            ToolBox.Initialize(mGraphics, mCamera);
            SoundManager.Init();
            mMusicManager = new MusicManager(Content, "music/background", "music/win", "music/lose");

            mSoundEffectManager = new SoundEffectManager(Content, "sounds/battering_ram", "sounds/bowman", "sounds/cavalry", "sounds/swordsman", "sounds/hero");
            AAudioMenu.Init(mSoundEffectManager, mMusicManager);
            GameState.Init(mSoundEffectManager);

            base.Initialize();
        }