public ThreeDScene(SceneManager SceneMgr)
 {
     m_SceneMgr = SceneMgr;
 }
        /// <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();
        }
 public ThreeDScene()
 {
     m_SceneMgr = GameFacade.Scenes;
     Camera = new Camera(Vector3.Backward * 17, Vector3.Zero, Vector3.Right);
 }
Example #4
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 SpriteBatch(GraphicsDevice);

            // 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));

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

            //Make the screenmanager, scenemanager and the startup path globally available to all Lua scripts.
            LuaInterfaceManager.ExportObject("ScreenManager", ScreenMgr);
            LuaInterfaceManager.ExportObject("ThreeDManager", SceneMgr);
            LuaInterfaceManager.ExportObject("StartupPath", GlobalSettings.Default.StartupPath);
            LuaInterfaceManager.ExportObject("GraphicsWidth", GlobalSettings.Default.GraphicsWidth);
            LuaInterfaceManager.ExportObject("GraphicsHeight", GlobalSettings.Default.GraphicsHeight);

            LoadStrings();
            ScreenMgr.TextDict = m_TextDict;

            if (GlobalSettings.Default.GraphicsWidth == 800)
                ScreenMgr.LoadInitialScreen("gamedata\\luascripts\\loading.lua");
            else
                ScreenMgr.LoadInitialScreen("gamedata\\luascripts\\loading_1024.lua");
            ContentManager.InitLoading();
        }