Пример #1
0
        /// <summary>
        /// LoadContent will be called once per game and is the place to load
        /// all of your content.
        /// </summary>
        protected override void LoadContent()
        {
            // TODO: use this.Content to load your game content here
            int Channel = Bass.BASS_StreamCreateFile("Sounds\\BUTTON.WAV", 0, 0, BASSFlag.BASS_DEFAULT);

            UISounds.AddSound(new UISound(0x01, Channel));

            GameFacade.MainFont = new TSOClient.Code.UI.Framework.Font();
            GameFacade.MainFont.AddSize(10, Content.Load <SpriteFont>("Fonts/ProjectDollhouse_10px"));
            GameFacade.MainFont.AddSize(12, Content.Load <SpriteFont>("Fonts/ProjectDollhouse_12px"));
            GameFacade.MainFont.AddSize(14, Content.Load <SpriteFont>("Fonts/ProjectDollhouse_14px"));
            GameFacade.MainFont.AddSize(16, Content.Load <SpriteFont>("Fonts/ProjectDollhouse_16px"));

            GameFacade.SoundManager = new TSOClient.Code.Sound.SoundManager();
            GameFacade.GameThread   = Thread.CurrentThread;

            uiLayer  = new UILayer(this, Content.Load <SpriteFont>("ComicSans"), Content.Load <SpriteFont>("ComicSansSmall"));
            SceneMgr = new _3DLayer();
            SceneMgr.Initialize(GraphicsDevice);

            GameFacade.Controller     = new GameController();
            GameFacade.Screens        = uiLayer;
            GameFacade.Scenes         = SceneMgr;
            GameFacade.GraphicsDevice = GraphicsDevice;
            GameFacade.Cursor         = new CursorManager(this.Window);
            GameFacade.Cursor.Init(tso.content.Content.Get().GetPath(""));

            /** Init any computed values **/
            GameFacade.Init();

            GameFacade.Strings = new ContentStrings();
            GameFacade.Controller.StartLoading();
        }
Пример #2
0
        /// <summary>
        /// LoadContent will be called once per game and is the place to load
        /// all of your content.
        /// </summary>
        protected override void LoadContent()
        {
            // Create a new SpriteBatch, which can be used to draw textures.
            spriteBatch = new UISpriteBatch(GraphicsDevice, 3);

            // TODO: use this.Content to load your game content here
            int Channel = Bass.BASS_StreamCreateFile("Sounds\\BUTTON.WAV", 0, 0, BASSFlag.BASS_DEFAULT);

            UISounds.AddSound(new UISound(0x01, Channel));

            GameFacade.MainFont = new TSOClient.Code.UI.Framework.Font();
            GameFacade.MainFont.AddSize(10, Content.Load <SpriteFont>("Fonts/ProjectDollhouse_10px"));
            GameFacade.MainFont.AddSize(12, Content.Load <SpriteFont>("Fonts/ProjectDollhouse_12px"));
            GameFacade.MainFont.AddSize(14, Content.Load <SpriteFont>("Fonts/ProjectDollhouse_14px"));
            GameFacade.MainFont.AddSize(16, Content.Load <SpriteFont>("Fonts/ProjectDollhouse_16px"));

            GameFacade.SoundManager = new TSOClient.Code.Sound.SoundManager();
            GameFacade.GameThread   = Thread.CurrentThread;

            ScreenMgr = new ScreenManager(this, Content.Load <SpriteFont>("ComicSans"),
                                          Content.Load <SpriteFont>("ComicSansSmall"));
            SceneMgr = new SceneManager(this);

            GameFacade.Controller     = new GameController();
            GameFacade.Screens        = ScreenMgr;
            GameFacade.Scenes         = SceneMgr;
            GameFacade.GraphicsDevice = GraphicsDevice;

            /** Init any computed values **/
            GameFacade.Init();

            GameFacade.LastUpdateState = m_UpdateState;
            GameFacade.Strings         = new ContentStrings();
            GameFacade.Controller.StartLoading();
        }