Exemplo n.º 1
0
        /// <summary>
        /// LoadContent はゲームごとに 1 回呼び出され,ここですべてのコンテンツを
        /// 読み込みます.
        /// </summary>
        protected override void LoadContent()
        {
            // 新規の SpriteBatch を作成します.これはテクスチャーの描画に使用できます.
            spriteBatch = new SpriteBatch(GraphicsDevice);
            //シーンのロード
            textureTitle = Content.Load <Texture2D>("title");
            sceneTextureList.Add(textureTitle);
            textureGameScene = Content.Load <Texture2D>("stage1");
            sceneTextureList.Add(textureTitle);
            textureClear = Content.Load <Texture2D>("clear");
            sceneTextureList.Add(textureClear);
            textureGameover = Content.Load <Texture2D>("gameover");
            sceneTextureList.Add(textureGameover);

            //オブジェクトのロード
            textureArrow = Content.Load <Texture2D>("arrow");

            title = new Titlescene(textureTitle, textureArrow);
            SceneList.Add(title);
            gamescene = new Gamescene(textureGameScene);
            SceneList.Add(title);
            clearscene = new Gamescene(textureClear);
            SceneList.Add(clearscene);
            gameoverscene = new Gamescene(textureGameover);
            SceneList.Add(gameoverscene);

            textureEnemy1 = Content.Load <Texture2D>("watermelon");
            enemyTextureList.Add(textureEnemy1);
            textureEnemy1 = Content.Load <Texture2D>("melon");
            enemyTextureList.Add(textureEnemy1);
            textureEnemy1 = Content.Load <Texture2D>("kingyo");
            enemyTextureList.Add(textureEnemy1);
            textureEnemy1 = Content.Load <Texture2D>("stagbeetle");
            enemyTextureList.Add(textureEnemy1);
            textureEnemy1 = Content.Load <Texture2D>("pantsu");
            enemyTextureList.Add(textureEnemy1);
            textureEnemy1 = Content.Load <Texture2D>("bura");
            enemyTextureList.Add(textureEnemy1);

            textureTama = Content.Load <Texture2D>("tamatate");
            tamaTextureList.Add(textureTama);
            textureTama = Content.Load <Texture2D>("tama1");
            tamaTextureList.Add(textureTama);
            textureTama = Content.Load <Texture2D>("tama2");
            tamaTextureList.Add(textureTama);
            textureTama = Content.Load <Texture2D>("tama3");
            tamaTextureList.Add(textureTama);
            textureTama = Content.Load <Texture2D>("tama4");
            tamaTextureList.Add(textureTama);
            textureTama = Content.Load <Texture2D>("tama5");
            tamaTextureList.Add(textureTama);
            textureTama = Content.Load <Texture2D>("tama6");
            tamaTextureList.Add(textureTama);

            textureItem = Content.Load <Texture2D>("item1");
            itemTextureList.Add(textureItem);
            textureItem = Content.Load <Texture2D>("item2");
            itemTextureList.Add(textureItem);
            textureItem = Content.Load <Texture2D>("item3");
            itemTextureList.Add(textureItem);
            textureItem = Content.Load <Texture2D>("item4");
            itemTextureList.Add(textureItem);
            textureItem = Content.Load <Texture2D>("item5");
            itemTextureList.Add(textureItem);
            textureItem = Content.Load <Texture2D>("item6");
            itemTextureList.Add(textureItem);


            textureEffect = Content.Load <Texture2D>("effect1");
            EffectSp      = new sprite(textureEffect, new Vector2(0, 0), new Point(100, 100), new Point(2, 1), 200);
            effectspriteList.Add(EffectSp);
            textureEffect = Content.Load <Texture2D>("effect2");
            EffectSp      = new sprite(textureEffect, new Vector2(0, 0), new Point(50, 50), new Point(4, 1), 400);
            effectspriteList.Add(EffectSp);

            texturePlayer = Content.Load <Texture2D>("beetle");
            playerSp      = new sprite(texturePlayer, new Vector2(0, 0), new Point(40, 60), new Point(3, 1), 5000);

            soundeffect = Content.Load <SoundEffect>("soundclear");          //0
            soundeffectList.Add(soundeffect);
            soundeffect = Content.Load <SoundEffect>("soundgameover");       //1
            soundeffectList.Add(soundeffect);
            soundeffect = Content.Load <SoundEffect>("soundhpreduce");       //2
            soundeffectList.Add(soundeffect);
            soundeffect = Content.Load <SoundEffect>("soundgetitem");        //3
            soundeffectList.Add(soundeffect);
            soundeffect = Content.Load <SoundEffect>("soundenemypowerdown"); //4
            soundeffectList.Add(soundeffect);
            soundeffect = Content.Load <SoundEffect>("soundshoot1");         //5
            soundeffectList.Add(soundeffect);
            soundeffect = Content.Load <SoundEffect>("soundshoot2");         //6
            soundeffectList.Add(soundeffect);
            soundeffect = Content.Load <SoundEffect>("soundshoot3");         //7
            soundeffectList.Add(soundeffect);
            soundeffect = Content.Load <SoundEffect>("soundshoot4");         //8
            soundeffectList.Add(soundeffect);
            soundeffect = Content.Load <SoundEffect>("soundshoot5");         //9
            soundeffectList.Add(soundeffect);
            soundeffect = Content.Load <SoundEffect>("soundshoot6");         //10
            soundeffectList.Add(soundeffect);
            soundeffect = Content.Load <SoundEffect>("soundshoot7");         //11
            soundeffectList.Add(soundeffect);
            soundeffect = Content.Load <SoundEffect>("soundshoot8");         //12
            soundeffectList.Add(soundeffect);
            soundeffect = Content.Load <SoundEffect>("soundshoot9");         //13
            soundeffectList.Add(soundeffect);
            soundeffect = Content.Load <SoundEffect>("soundshoot10");        //14
            soundeffectList.Add(soundeffect);

            //bgm = Content.Load<Song>("bgm");

            //敵のステータスのロード
            EnemyStatus ene;

            ene = new EnemyStatus(1, 1, 10, 1);    //スイカ
            enemyStatusList.Add(ene);
            ene = new EnemyStatus(2, 1, 20, 1);    //メロン
            enemyStatusList.Add(ene);
            ene = new EnemyStatus(3, 1, 100, 1);   //金魚
            enemyStatusList.Add(ene);
            ene = new EnemyStatus(4, 1, 1000, 10); //クワガタ
            enemyStatusList.Add(ene);
            ene = new EnemyStatus(5, 1, 100, 10);  //パンツ
            enemyStatusList.Add(ene);
            ene = new EnemyStatus(5, 1, 100, 10);  //ブラ
            enemyStatusList.Add(ene);

            // TODO: this.Content クラスを使用して,ゲームのコンテンツを読み込みます.
        }
Exemplo n.º 2
0
        /// <summary>
        /// LoadContent はゲームごとに 1 回呼び出され,ここですべてのコンテンツを
        /// 読み込みます.
        /// </summary>
        protected override void LoadContent()
        {
            // 新規の SpriteBatch を作成します.これはテクスチャーの描画に使用できます.
            spriteBatch = new SpriteBatch(GraphicsDevice);
            //シーンのロード
            textureTitle = Content.Load<Texture2D>("title");
            sceneTextureList.Add(textureTitle);
            textureGameScene = Content.Load<Texture2D>("stage1");
            sceneTextureList.Add(textureTitle);
            textureClear = Content.Load<Texture2D>("clear");
            sceneTextureList.Add(textureClear);
            textureGameover = Content.Load<Texture2D>("gameover");
            sceneTextureList.Add(textureGameover);

            //オブジェクトのロード
            textureArrow = Content.Load<Texture2D>("arrow");

            title = new Titlescene(textureTitle, textureArrow);
            SceneList.Add(title);
            gamescene = new Gamescene(textureGameScene);
            SceneList.Add(title);
            clearscene = new Gamescene(textureClear);
            SceneList.Add(clearscene);
            gameoverscene = new Gamescene(textureGameover);
            SceneList.Add(gameoverscene);

            textureEnemy1 = Content.Load<Texture2D>("watermelon");
            enemyTextureList.Add(textureEnemy1);
            textureEnemy1 = Content.Load<Texture2D>("melon");
            enemyTextureList.Add(textureEnemy1);
            textureEnemy1 = Content.Load<Texture2D>("kingyo");
            enemyTextureList.Add(textureEnemy1);
            textureEnemy1 = Content.Load<Texture2D>("stagbeetle");
            enemyTextureList.Add(textureEnemy1);
            textureEnemy1 = Content.Load<Texture2D>("pantsu");
            enemyTextureList.Add(textureEnemy1);
            textureEnemy1 = Content.Load<Texture2D>("bura");
            enemyTextureList.Add(textureEnemy1);
            
            textureTama = Content.Load<Texture2D>("tamatate");
            tamaTextureList.Add(textureTama);
            textureTama = Content.Load<Texture2D>("tama1");
            tamaTextureList.Add(textureTama);
            textureTama = Content.Load<Texture2D>("tama2");
            tamaTextureList.Add(textureTama);
            textureTama = Content.Load<Texture2D>("tama3");
            tamaTextureList.Add(textureTama);
            textureTama = Content.Load<Texture2D>("tama4");
            tamaTextureList.Add(textureTama);
            textureTama = Content.Load<Texture2D>("tama5");
            tamaTextureList.Add(textureTama);
            textureTama = Content.Load<Texture2D>("tama6");
            tamaTextureList.Add(textureTama);

            textureItem = Content.Load<Texture2D>("item1");
            itemTextureList.Add(textureItem);
            textureItem = Content.Load<Texture2D>("item2");
            itemTextureList.Add(textureItem);
            textureItem = Content.Load<Texture2D>("item3");
            itemTextureList.Add(textureItem);
            textureItem = Content.Load<Texture2D>("item4");
            itemTextureList.Add(textureItem);
            textureItem = Content.Load<Texture2D>("item5");
            itemTextureList.Add(textureItem);
            textureItem = Content.Load<Texture2D>("item6");
            itemTextureList.Add(textureItem);


            textureEffect = Content.Load<Texture2D>("effect1");
            EffectSp = new sprite(textureEffect, new Vector2(0, 0), new Point(100, 100), new Point(2, 1), 200);
            effectspriteList.Add(EffectSp);
            textureEffect = Content.Load<Texture2D>("effect2");
            EffectSp = new sprite(textureEffect, new Vector2(0, 0), new Point(50, 50), new Point(4, 1), 400);
            effectspriteList.Add(EffectSp);

            texturePlayer = Content.Load<Texture2D>("beetle");
            playerSp = new sprite(texturePlayer, new Vector2(0, 0), new Point(40, 60), new Point(3, 1), 5000);

            soundeffect = Content.Load<SoundEffect>("soundclear");//0
            soundeffectList.Add(soundeffect);
            soundeffect = Content.Load<SoundEffect>("soundgameover");//1
            soundeffectList.Add(soundeffect);
            soundeffect = Content.Load<SoundEffect>("soundhpreduce");//2
            soundeffectList.Add(soundeffect);
            soundeffect = Content.Load<SoundEffect>("soundgetitem");//3
            soundeffectList.Add(soundeffect);
            soundeffect = Content.Load<SoundEffect>("soundenemypowerdown");//4
            soundeffectList.Add(soundeffect);
            soundeffect = Content.Load<SoundEffect>("soundshoot1");//5
            soundeffectList.Add(soundeffect);
            soundeffect = Content.Load<SoundEffect>("soundshoot2");//6
            soundeffectList.Add(soundeffect);
            soundeffect = Content.Load<SoundEffect>("soundshoot3");//7
            soundeffectList.Add(soundeffect);
            soundeffect = Content.Load<SoundEffect>("soundshoot4");//8
            soundeffectList.Add(soundeffect);
            soundeffect = Content.Load<SoundEffect>("soundshoot5");//9
            soundeffectList.Add(soundeffect);
            soundeffect = Content.Load<SoundEffect>("soundshoot6");//10
            soundeffectList.Add(soundeffect);
            soundeffect = Content.Load<SoundEffect>("soundshoot7");//11
            soundeffectList.Add(soundeffect);
            soundeffect = Content.Load<SoundEffect>("soundshoot8");//12
            soundeffectList.Add(soundeffect);
            soundeffect = Content.Load<SoundEffect>("soundshoot9");//13
            soundeffectList.Add(soundeffect);
            soundeffect = Content.Load<SoundEffect>("soundshoot10");//14
            soundeffectList.Add(soundeffect);

            //bgm = Content.Load<Song>("bgm");

            //敵のステータスのロード
            EnemyStatus ene;
            ene = new EnemyStatus(1, 1, 10, 1); //スイカ
            enemyStatusList.Add(ene);
            ene = new EnemyStatus(2, 1, 20, 1); //メロン
            enemyStatusList.Add(ene);
            ene = new EnemyStatus(3, 1, 100, 1); //金魚
            enemyStatusList.Add(ene);
            ene = new EnemyStatus(4, 1, 1000, 10); //クワガタ
            enemyStatusList.Add(ene);
            ene = new EnemyStatus(5, 1, 100, 10); //パンツ
            enemyStatusList.Add(ene);
            ene = new EnemyStatus(5, 1, 100, 10); //ブラ
            enemyStatusList.Add(ene);

            // TODO: this.Content クラスを使用して,ゲームのコンテンツを読み込みます.

        }