예제 #1
0
파일: Game1.cs 프로젝트: Fusionnist/LD43
        } //check whatever is plugged in to create input settings

        protected override void LoadContent()
        {
            spriteBatch = new SpriteBatch(GraphicsDevice);

            ElementCollection.ReadDocument(XDocument.Load("Content/Xml/Registry.xml"));
            SpriteSheetCollection.LoadFromElementCollection(Content);

            cursorTex = SpriteSheetCollection.GetTex("static", "PlaceholderSheet", "cursor");
            icons     = SpriteSheetCollection.GetTex("idle", "buttons", "question");
            meterTex  = new TextureDrawer(Content.Load <Texture2D>("Placeholder/meter"));
            cloudTex  = new TextureDrawer(Content.Load <Texture2D>("Sprites/clouds"));

            dd = TextureDrawer.FromHorizontalStrip(Content.Load <Texture2D>("Placeholder/Daytime"), 39);
            mm = TextureDrawer.FromHorizontalStrip(Content.Load <Texture2D>("Placeholder/MM"), 39);

            LoadBGs();
            CreateUI();

            SoundManager.AddSong(Content.Load <Song>("Audio/PrototypeMusic3"), "game");
            //SoundManager.AddSong(Content.Load<Song>("Audio/tinymusic"), "game");
            SoundManager.AddSong(Content.Load <Song>("Audio/MenuTrack"), "main");


            SoundManager.AddEffect(Content.Load <SoundEffect>("Audio/build"), "build");
            SoundManager.AddEffect(Content.Load <SoundEffect>("Audio/church_victory"), "win");
            SoundManager.AddEffect(Content.Load <SoundEffect>("Audio/loss"), "lose");
            SoundManager.AddEffect(Content.Load <SoundEffect>("Audio/sacrifice"), "sacrifice");
            SoundManager.AddEffect(Content.Load <SoundEffect>("Audio/delevel"), "destroy");

            gameBg      = SpriteSheetCollection.GetTex("bg", "gameBgs", "bg");
            clouds      = SpriteSheetCollection.GetTex("clouds", "gameBgs", "bg");
            mountains   = SpriteSheetCollection.GetTex("fg", "gameBgs", "bg");
            aendingAnim = SpriteSheetCollection.GetTex("bg", "endingSheet", "bg");
            gded        = SpriteSheetCollection.GetTex("bg", "churchEndingSheet", "bg");

            SoundManager.PlaySong("main");

            ParticleSystem.AcquireTxture(SpriteSheetCollection.GetTex("smoke", "smoke", "smoke"));

            CreateNewGame();
        }
예제 #2
0
        protected override void LoadContent()
        {
            spriteBatch = new SpriteBatch(GraphicsDevice);
            //LOAD XML
            ElementCollection.ReadDocument(XDocument.Load("Content/XML/Items.xml"));
            ElementCollection.ReadDocument(XDocument.Load("Content/XML/MiscEntities.xml"));
            ElementCollection.ReadDocument(XDocument.Load("Content/XML/Pickups.xml"));
            ElementCollection.ReadDocument(XDocument.Load("Content/XML/Spritesheets.xml"));

            SpriteSheetCollection.ReadDocument(XDocument.Load("Content/XML/Spritesheets.xml"), Content);

            SoundManager.AddEffect(Content.Load <SoundEffect>("SFX/hit1"), "hit1");
            SoundManager.AddEffect(Content.Load <SoundEffect>("SFX/hit2"), "hit2");
            SoundManager.AddEffect(Content.Load <SoundEffect>("SFX/hit3"), "hit3");
            SoundManager.AddEffect(Content.Load <SoundEffect>("SFX/hit4"), "hit4");
            SoundManager.AddEffect(Content.Load <SoundEffect>("SFX/hit5"), "hit5");
            SoundManager.AddEffect(Content.Load <SoundEffect>("SFX/hit6"), "hit6");
            SoundManager.AddEffect(Content.Load <SoundEffect>("SFX/hit7"), "hit7");

            SoundManager.AddSong(Content.Load <Song>("Music/dungeonrun"), "gamesong");
            SoundManager.AddSong(Content.Load <Song>("Music/menusong"), "menusong");
            SoundManager.PlaySong("menusong");

            RecipeBook.ReadDocument(XDocument.Load("Content/XML/Recipes.xml"));
            //LOAD TEXTURES
            ParticleSystem.AcquireTxture(SpriteSheetCollection.GetTex("appear", "slotappears", "slot"));
            ParticleSystem.AcquireTxture(SpriteSheetCollection.GetTex("stars", "miscsheet1", "particle"));
            scoretex = SpriteSheetCollection.GetTex("score", "score", "button");
            //LOAD SOUND

            //LOAD ENTITIES

            //LOAD UR MOM
            SetupUISystems();

            //END - SETUP THE GAME!
            SetupGame();
        }