예제 #1
0
        /// <summary>
        /// Loads content and and game logic.
        /// </summary>
        protected override void LoadContent()
        {
            // The primitive manager and spritebatch is loaded.
            primManager = new PrimManager(this, Content.Load <Effect>("Texts/WorldEffect"));
            spriteBatch = new SpriteBatch(GraphicsDevice);

            // Loads textures and fonts.
            textureManager.LoadTexturesFromFile("textureinfo", Content);
            FontMain = Content.Load <SpriteFont>("Fonts/FontMain");
            FontTiny = Content.Load <SpriteFont>("Fonts/FontTiny");

            // ---- GAME SPECIFIC INITALIZATIONS ----
            room = new Room(this, "blockset1", "plateau1");
            screenManager.AddScreen(new LevelEditor(this));
            cubeManager.AddCube(new Player(new Vector3(3, 3, 5), new PlayerAI(), textureManager.AniDic["player"]));
            cubeManager.AddCube(new PushCube(new Vector3(4, 3, 5), textureManager.TilesetList[0].Tiles[1]));

            // Places the light.
            primManager.myEffect.PlaceLightUsingDirection(this, 16);
            primManager.myEffect.UpdateShadowMap(this);
        }