コード例 #1
0
 public override void LoadContent(IContentHelper contentHelper)
 {
     Size                             = new Vector2(6, 6);
     bossSpriteSheet                  = bossSpriteSheet ?? contentHelper.GetContent <Texture2D>(GetBossSpriteSheetName(levelNumber));
     bossHitSpriteSheet               = bossHitSpriteSheet ?? contentHelper.GetContent <Texture2D>(GetBossHitSpriteSheetName(levelNumber));
     destructionSpriteSheet           = destructionSpriteSheet ?? contentHelper.GetContent <Texture2D>("BossDestructionSpriteSheet");
     hitSoundEffectInstance           = hitSoundEffectInstance ?? contentHelper.GetSoundEffectInstance(this.GetType().Name + "Hit");
     bossExplosionSoundEffectInstance = bossExplosionSoundEffectInstance ?? contentHelper.GetSoundEffectInstance("BossExplosion");
     fireSoundInstance                = fireSoundInstance ?? contentHelper.GetSoundEffectInstance("Fire");
 }
コード例 #2
0
        public override void LoadContent(IContentHelper contentHelper)
        {
            LoadEnemySpriteSheet(contentHelper);
            destructionSpriteSheet = destructionSpriteSheet ?? contentHelper.GetContent <Texture2D>("DestructionSpriteSheet");
            comboSpriteSheet       = comboSpriteSheet ?? contentHelper.GetContent <Texture2D>("ComboSpriteSheet");
            var fireEffect = contentHelper.GetContent <SoundEffect>("Fire");

            if (fireEffect != null)
            {
                fireSoundInstance = fireSoundInstance ?? fireEffect.CreateInstance();
            }
        }
コード例 #3
0
        public virtual void LoadContent(IContentHelper contentHelper)
        {
            this.contentHelper = contentHelper;
            finishLevelSong    = contentHelper.GetContent <Song>("FinishLevel");
            theEndSong         = contentHelper.GetContent <Song>("TheEnd");
            font                     = contentHelper.GetContent <SpriteFont>("Shooter");
            titleTexture             = contentHelper.GetContent <Texture2D>("Title");
            loveTexture              = contentHelper.GetContent <Texture2D>("LoveSpriteSheet");
            cursorTexture            = contentHelper.GetContent <Texture2D>("CursorSpriteSheet");
            clockSoundEffectInstance = contentHelper.GetSoundEffectInstance("Clock");

            //princess = new Princess();
            //princess.LoadContent(contentHelper);

            InitializeLevel();
        }
コード例 #4
0
 public override void LoadContent(IContentHelper contentHelper)
 {
     Size = new Vector2(2.5f, 2.5f);
     princessSpriteSheet = princessSpriteSheet ?? contentHelper.GetContent <Texture2D>("PrincessSpriteSheet");
 }
コード例 #5
0
        public void LoadContent(IContentHelper contentHelper)
        {
            contentHelper = ContentHelper.Instance;
            foreach (var viewState in viewStatesDic.Values)
            {
                viewState.LoadContent(contentHelper);
            }

            contentHelper.GetContent <Song>("FinishLevel");
            contentHelper.GetContent <Song>("TheEnd");
            contentHelper.GetContent <SpriteFont>("Shooter");
            contentHelper.GetContent <Texture2D>("Title");
            contentHelper.GetContent <Texture2D>("LoveSpriteSheet");
            contentHelper.GetContent <Texture2D>("CursorSpriteSheet");
            contentHelper.GetContent <Texture2D>("Boss1SpriteSheet");
            contentHelper.GetContent <Texture2D>("Boss1HitSpriteSheet");
            contentHelper.GetContent <Texture2D>("BossDestructionSpriteSheet");
            contentHelper.GetContent <Texture2D>("BonusSpriteSheet");
            contentHelper.GetContent <Texture2D>("EnemySpriteSheet");
            contentHelper.GetContent <Texture2D>("DestructionSpriteSheet");
            contentHelper.GetContent <Texture2D>("ComboSpriteSheet");
            contentHelper.GetContent <Texture2D>("EnemySpriteSheet");
            contentHelper.GetContent <Texture2D>("EnemyBullet3SpriteSheet");
            contentHelper.GetContent <Texture2D>("EnemyBulletSpriteSheet");
            contentHelper.GetContent <Texture2D>("PlayerBullet1SpriteSheet");
            contentHelper.GetContent <Texture2D>("EnemyBullet2SpriteSheet");
            contentHelper.GetContent <Texture2D>("PlayerBullet1SpriteSheet");
            //contentHelper.GetSoundEffectInstance("PlayerBullet1Shooting");
            contentHelper.GetSoundEffectInstance("Fire");
            contentHelper.GetSoundEffectInstance("Clock");
        }
コード例 #6
0
 public override void LoadContent(IContentHelper contentHelper)
 {
     base.LoadContent(contentHelper);
     shadowSpriteSheet = shadowSpriteSheet ?? contentHelper.GetContent <Texture2D>("ShadowSpriteSheet");
 }
コード例 #7
0
 protected override void LoadEnemySpriteSheet(IContentHelper contentHelper)
 {
     enemyTexture = enemyTexture ?? contentHelper.GetContent <Texture2D>("EnemySpriteSheet");
 }
コード例 #8
0
 public override void LoadContent(IContentHelper contentHelper)
 {
     this.contentHelper = contentHelper;
     weaponSpriteSheet  = weaponSpriteSheet ?? contentHelper.GetContent <Texture2D>("WeaponSpriteSheet");
 }
コード例 #9
0
 public override void LoadContent(IContentHelper contentHelper)
 {
     bonusSpriteSheet = bonusSpriteSheet ?? contentHelper.GetContent <Texture2D>("BonusSpriteSheet");
 }
コード例 #10
0
 public override void LoadContent(IContentHelper contentHelper)
 {
     playerSpriteSheet      = playerSpriteSheet ?? contentHelper.GetContent <Texture2D>("PlayerSpriteSheet");
     destructionSpriteSheet = destructionSpriteSheet ?? contentHelper.GetContent <Texture2D>("PlayerDestructionSpriteSheet");
     fireSoundInstance      = fireSoundInstance ?? contentHelper.GetSoundEffectInstance("Fire");
 }
コード例 #11
0
 public override void LoadContent(IContentHelper contentHelper)
 {
     base.LoadContent(contentHelper);
     introSong = contentHelper.GetContent <Song>("Intro");
 }
コード例 #12
0
 public override void LoadContent(IContentHelper contentHelper)
 {
     gameOverSong = contentHelper.GetContent <Song>("GameOver");
     base.LoadContent(contentHelper);
 }
コード例 #13
0
 public override void LoadContent(IContentHelper contentHelper)
 {
     powerUpSpriteSheet = powerUpSpriteSheet ?? contentHelper.GetContent <Texture2D>("PowerUpSpriteSheet");
 }
コード例 #14
0
 public virtual void LoadContent(IContentHelper contentHelper)
 {
     font = font ?? contentHelper.GetContent <SpriteFont>("Shooter");
 }
コード例 #15
0
 protected virtual void LoadEnemySpriteSheet(IContentHelper contentHelper)
 {
     enemySpriteSheet = enemySpriteSheet ?? contentHelper.GetContent <Texture2D>(this.GetType().Name + "SpriteSheet");
 }
コード例 #16
0
 public override void LoadContent(IContentHelper contentHelper)
 {
     base.LoadContent(contentHelper);
     startSong = contentHelper.GetContent <Song>("StartNew");
     clickSoundEffectInstance = contentHelper.GetSoundEffectInstance("Click");
 }
コード例 #17
0
        public override void LoadContent(IContentHelper contentHelper)
        {
            dyingSong = contentHelper.GetContent <Song>("Death");

            base.LoadContent(contentHelper);
        }
コード例 #18
0
 public override void LoadContent(IContentHelper contentHelper)
 {
     bulletSpriteSheet = bulletSpriteSheet ?? contentHelper.GetContent <Texture2D>(this.GetType().Name + "SpriteSheet");
     //soundEffectInstance = soundEffectInstance ?? contentHelper.GetSoundEffectInstance(this.GetType().Name + "Shooting");
     soundEffectInstance = soundEffectInstance ?? contentHelper.GetSoundEffectInstance("Fire");
 }