/// <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); gameFontText = Content.Load<SpriteFont>("testFont"); aFac = new AnimationFactory(this.Content); audFac = new AudioFactory(this.Content); globalCompanyLogo = this.Content.Load<Texture2D>("FrostTreeLogo"); globalGameLogo = this.Content.Load<Texture2D>("ZippyPushKidLogo"); globalTestWalrus = this.Content.Load<Texture2D>("walrus"); globalTestPositive = this.Content.Load<Texture2D>("posTest"); globalTestNegative = this.Content.Load<Texture2D>("negTest"); globalBlackPixel = this.Content.Load<Texture2D>("1x1BlackPixel"); globalWhitePixel = this.Content.Load<Texture2D>("1x1WhitePixel"); globalCreditsList = this.Content.Load<Texture2D>("credits"); copyright = this.Content.Load<Texture2D>("copyright"); tintRedEffect = this.Content.Load<Effect>("TintRed"); tintRedEffect.CurrentTechnique = tintRedEffect.Techniques["Technique1"]; grayCheckerBoard = this.Content.Load<Effect>("GrayCheckerBoard"); grayCheckerBoard.CurrentTechnique = grayCheckerBoard.Techniques["Technique1"]; diamondWipe = this.Content.Load<Effect>("DiamondWipe"); diamondWipe.CurrentTechnique = diamondWipe.Techniques["Technique1"]; assetsLoaded = false; screenManager = new GameScreenManager(this.Content); GameScreenManager.switchScreens(GameScreenManager.GameScreenType.SplashScreen, null); }
public static void loadGameAssets() { #if XBOX Thread.CurrentThread.SetProcessorAffinity(Game1.loadThread); #endif if (assetsLoaded) { return; } AnimationFactory aFac = new AnimationFactory(null); aFac.pushSheet("playerSheet"); aFac.pushSheet("conveyer"); aFac.pushSheet("spikes"); aFac.pushSheet("cursorTarget"); aFac.pushSheet("testBulletSheet"); aFac.pushSheet("angrySawSheet"); aFac.pushSheet("pushArrow"); aFac.pushSheet("lolrusSheet"); aFac.pushSheet("bucketSheet"); aFac.pushSheet("lavaBottomSheet"); aFac.pushSheet("fireballSheet"); aFac.pushSheet("lavaDumperSheet"); aFac.pushSheet("shieldGuySheet"); aFac.pushSheet("heartSheet"); aFac.pushSheet("dansParticleSheet"); aFac.pushSheet("flagDoorSheet"); aFac.pushSheet("flagKeySheet"); aFac.pushSheet("wopleySheet"); aFac.pushSheet("heartSheet2"); aFac.pushSheet("brainSheet"); aFac.pushSheet("lungSheet"); aFac.pushSheet("tutorialSignsSheet"); aFac.pushSheet("endLevelSheet"); aFac.pushSheet("guiComponentSheet"); aFac.pushSheet("testParallaxSheet"); aFac.pushSheet("xboxButtonsSheet"); aFac.pushSheet("goombaSheet"); aFac.pushSheet("factoryParallaxSheet"); aFac.pushSheet("wopleyShieldSheet"); aFac.pushSheet("titleScreenGrass"); aFac.pushSheet("sewerParallaxSheet"); aFac.pushSheet("cityParallaxSheet"); aFac.pushSheet("RSTutSheet"); aFac.pushSheet("pushTutSheet"); aFac.pushSheet("killTutSheet"); aFac.pushSheet("enemyTutSheet"); aFac.pushAnimation("playerAnims"); aFac.pushAnimation("conveyerAnims"); aFac.pushAnimation("spikesAnim"); aFac.pushAnimation("cursorTargetAnims"); aFac.pushAnimation("testBulletAnims"); aFac.pushAnimation("angrySaw"); aFac.pushAnimation("pushArrowAnims"); aFac.pushAnimation("lolrus"); aFac.pushAnimation("bucket"); aFac.pushAnimation("lavaBottom"); aFac.pushAnimation("fireball"); aFac.pushAnimation("lavaDumper"); aFac.pushAnimation("shieldGuy"); aFac.pushAnimation("heart"); aFac.pushAnimation("dansParticleAnims"); aFac.pushAnimation("flagDoorAnims"); aFac.pushAnimation("flagKeyAnims"); aFac.pushAnimation("wopley"); aFac.pushAnimation("heartProjectile"); aFac.pushAnimation("brain"); aFac.pushAnimation("lung"); aFac.pushAnimation("guiComponentAnims"); aFac.pushAnimation("tutorialSignsAnims"); aFac.pushAnimation("endLevelAnims"); aFac.pushAnimation("testParallaxAnims"); aFac.pushAnimation("xboxButtonsAnims"); aFac.pushAnimation("goomba"); aFac.pushAnimation("factoryParallax"); aFac.pushAnimation("wopleyShield"); aFac.pushAnimation("titleScreenGrassAnims"); aFac.pushAnimation("sewerParallax"); aFac.pushAnimation("cityParallax"); AudioFactory.pushNewSong("songs/song0"); AudioFactory.pushNewSong("songs/song1"); AudioFactory.pushNewSong("songs/song2"); AudioFactory.pushNewSong("songs/song3"); AudioFactory.pushNewSong("songs/song4"); AudioFactory.pushNewSong("songs/introTheme"); AudioFactory.pushNewSFX("sfx/lose"); AudioFactory.pushNewSFX("sfx/menu"); AudioFactory.pushNewSFX("sfx/explosion"); AudioFactory.pushNewSFX("sfx/menuOpen"); AudioFactory.pushNewSFX("sfx/menuClose"); AudioFactory.pushNewSFX("sfx/menuDeny"); AudioFactory.pushNewSFX("sfx/doorClose"); AudioFactory.pushNewSFX("sfx/unlockDoor"); AudioFactory.pushNewSFX("sfx/getHealth"); AudioFactory.pushNewSFX("sfx/fanfare"); AudioFactory.pushNewSFX("sfx/getHurt"); AudioFactory.pushNewSFX("sfx/hurtGoomba"); AudioFactory.pushNewSFX("sfx/wopleyDeath"); AudioFactory.pushNewSFX("sfx/firework"); AudioFactory.pushNewSFX("sfx/firework2"); AudioFactory.pushNewSFX("sfx/firework3"); #if XBOX Thread.Sleep(2000); #endif assetsLoaded = true; }