コード例 #1
0
        public override void Update()
        {
            bool isDividing = false;

            if (!isAlive || this.comboCount >= 3) isDividing = true;// 3ダメージ目で強制分裂

            if (isDividing && !isDivided) {
                J1 = new JumpingEnemy(stage, defPos.X, defPos.Y, 20, 20, 3);
                J2 = new JumpingEnemy(stage, defPos.X + 20, defPos.Y, 20, 20, 3);
                J1.Load(game.Content, "Object\\Character\\JumpingEnemy3d");
                J2.Load(game.Content, "Object\\Character\\JumpingEnemy3d");
                stage.unitToAdd.Add(J1);
                stage.unitToAdd.Add(J2);
                J1.isDerived = true;
                J2.isDerived = true;
                isDivided = true;
            }

            base.Update();

            /*if (HP <= 0 && (J1.isAlive || J2.isAlive)) {
                isDividing = true;
                isDivided = true;
                isAlive = true;     // characters変更するとforeach使えなくなるから諦める
                isActive = false;
                HP = 1;
            }*/
        }
コード例 #2
0
        // コンストラクタ
        public Fuujin(Stage stage, float x, float y, int width, int height, int HP, float vx, int bulletType, int shootType)
            : base(stage, x, y, width, height, HP, bulletType, shootType)
        {
            bindSize        = new Vector2(180, 100);
            bindPos         = new Vector2(50, 50);
            defBindPos      = new Vector2(95, 83);
            defBindPosOther = new Vector2(width - defBindPos.X - bindSize.X, 50);


            this.defaultPosition = position;
            tmpPosition          = defaultPosition + new Vector2(-100, -200);
            attackPosition       = new Vector2(defaultPosition.X - 720, defaultPosition.Y);      // new Vector2(defaultPosition.X - 500, defaultPosition.Y);
            animation            = new Animation(380, 310);
            resWaitTime          = 240;

            //bindSize = new Vector2(260, 260);
            //animation2 = new Animation(210, 210);

            obstacles            = new List <Obstacle>();
            obstacleMeteor       = new Obstacle(stage, this, x, y, 32, 64, 2, 0);
            obstacleIcicleRandom = new Obstacle(stage, this, x, y, 32, 64, 2, 1);
            //obstacleIcicleAlternate = new Obstacle(stage, this, x, y, 32, 64, 2, 1);
            obstacleTornadeSmall = new Obstacle(stage, this, x, y, 32, 32, 2, 3);
            obstacleTornadeLarge = new Obstacle(stage, this, x, y, 32, 32, 2, 4);

            // !reuseBullet版
            //cutterTurret5Way = new Turret(stage, this, new Vector2(150, 100), 32, 32, 0, 5, 5, false, true, 0, 4);
            //cutterTurret1WayBurst = new Turret(stage, this, new Vector2(150, 100), 32, 32, 0, 1, 10, false, true, 0, 4, 10, 320, 10);
            cutterTurret5Way               = new Turret(stage, this, new Vector2(150, 100), 32, 32, 0, 5, 5, false, true, 0, 4, 10, 60, 10, Vector2.Zero, false, false);
            cutterTurret1WayBurst          = new Turret(stage, this, new Vector2(150, 100), 32, 32, 0, 1, 10, false, true, 0, 4, 10, 320, 10, Vector2.Zero, false, false);
            cutterTurret1WayBurst.isMarked = true;
            cutterTurretAlternate          = new Turret(stage, this, new Vector2(150, 100), 32, 32, 0, 5, 2, false, true, 0, 4, 10, 60, 10, Vector2.Zero, false, true, new int[] { 5, 1 });   // bulSpeed 5→10
            // shootInterval == 120だと、連発した時にPlayerを最初しか上手く追尾しない?

            obstacles.Add(obstacleMeteor);
            obstacles.Add(obstacleIcicleRandom);
            obstacles.Add(obstacleTornadeSmall);
            obstacles.Add(obstacleTornadeLarge);
            foreach (Obstacle obs in obstacles)
            {
                weapons.Add(obs);
            }
            turrets.Add(cutterTurret5Way);
            weapons.Add(cutterTurret5Way);
            turrets.Add(cutterTurret1WayBurst);
            weapons.Add(cutterTurret1WayBurst);
            turrets.Add(cutterTurretAlternate);
            weapons.Add(cutterTurretAlternate);

            largeWind = new Weapon(stage, x, y, 64, 400, this);
            weapons.Add(largeWind);

            jumpingEnemy = new JumpingEnemy(stage, position.X, position.Y, 32, 32, 2, this);
            stage.characters.Add(jumpingEnemy);

            foreach (Weapon weapon in weapons)
            {
                stage.weapons.Add(weapon);
            }
        }
コード例 #3
0
        public override void Update()
        {
            bool isDividing = false;

            if (!isAlive || this.comboCount >= 3)
            {
                isDividing = true;                                  // 3ダメージ目で強制分裂
            }
            if (isDividing && !isDivided)
            {
                J1 = new JumpingEnemy(stage, defPos.X, defPos.Y, 20, 20, 3);
                J2 = new JumpingEnemy(stage, defPos.X + 20, defPos.Y, 20, 20, 3);
                J1.Load(game.Content, "Object\\Character\\JumpingEnemy3d");
                J2.Load(game.Content, "Object\\Character\\JumpingEnemy3d");
                stage.unitToAdd.Add(J1);
                stage.unitToAdd.Add(J2);
                J1.isDerived = true;
                J2.isDerived = true;
                isDivided    = true;
            }

            base.Update();

            /*if (HP <= 0 && (J1.isAlive || J2.isAlive)) {
             *  isDividing = true;
             *  isDivided = true;
             *  isAlive = true;     // characters変更するとforeach使えなくなるから諦める
             *  isActive = false;
             *  HP = 1;
             * }*/
        }
コード例 #4
0
        // コンストラクタ
        public Fuujin(Stage stage, float x, float y, int width, int height, int HP, float vx, int bulletType, int shootType)
            : base(stage, x, y, width, height, HP, bulletType, shootType)
        {
            bindSize = new Vector2(180, 100);
            bindPos = new Vector2(50, 50);
            defBindPos = new Vector2(95, 83);
            defBindPosOther = new Vector2(width - defBindPos.X - bindSize.X, 50);

            this.defaultPosition = position;
            tmpPosition = defaultPosition + new Vector2(-100, -200);
            attackPosition = new Vector2(defaultPosition.X - 720, defaultPosition.Y);// new Vector2(defaultPosition.X - 500, defaultPosition.Y);
            animation = new Animation(380, 310);
            resWaitTime = 240;

            //bindSize = new Vector2(260, 260);
            //animation2 = new Animation(210, 210);

            obstacles = new List<Obstacle>();
            obstacleMeteor = new Obstacle(stage, this, x, y, 32, 64, 2, 0);
            obstacleIcicleRandom = new Obstacle(stage, this, x, y, 32, 64, 2, 1);
            //obstacleIcicleAlternate = new Obstacle(stage, this, x, y, 32, 64, 2, 1);
            obstacleTornadeSmall = new Obstacle(stage, this, x, y, 32, 32, 2, 3);
            obstacleTornadeLarge = new Obstacle(stage, this, x, y, 32, 32, 2, 4);

            // !reuseBullet版
            //cutterTurret5Way = new Turret(stage, this, new Vector2(150, 100), 32, 32, 0, 5, 5, false, true, 0, 4);
            //cutterTurret1WayBurst = new Turret(stage, this, new Vector2(150, 100), 32, 32, 0, 1, 10, false, true, 0, 4, 10, 320, 10);
            cutterTurret5Way = new Turret(stage, this, new Vector2(150, 100), 32, 32, 0, 5, 5, false, true, 0, 4, 10, 60, 10, Vector2.Zero, false, false);
            cutterTurret1WayBurst = new Turret(stage, this, new Vector2(150, 100), 32, 32, 0, 1, 10, false, true, 0, 4, 10, 320, 10, Vector2.Zero, false, false);
            cutterTurret1WayBurst.isMarked = true;
            cutterTurretAlternate = new Turret(stage, this, new Vector2(150, 100), 32, 32, 0, 5, 2, false, true, 0, 4, 10, 60, 10, Vector2.Zero, false, true, new int[] { 5, 1 });// bulSpeed 5→10
            // shootInterval == 120だと、連発した時にPlayerを最初しか上手く追尾しない?

            obstacles.Add(obstacleMeteor);
            obstacles.Add(obstacleIcicleRandom);
            obstacles.Add(obstacleTornadeSmall);
            obstacles.Add(obstacleTornadeLarge);
            foreach (Obstacle obs in obstacles) weapons.Add(obs);
            turrets.Add(cutterTurret5Way);
            weapons.Add(cutterTurret5Way);
            turrets.Add(cutterTurret1WayBurst);
            weapons.Add(cutterTurret1WayBurst);
            turrets.Add(cutterTurretAlternate);
            weapons.Add(cutterTurretAlternate);

            largeWind = new Weapon(stage, x, y, 64, 400, this);
            weapons.Add(largeWind);

            jumpingEnemy = new JumpingEnemy(stage, position.X, position.Y, 32, 32, 2, this);
            stage.characters.Add(jumpingEnemy);

            foreach (Weapon weapon in weapons) stage.weapons.Add(weapon);
        }
コード例 #5
0
		public Raijin(Stage stage, float x, float y, int width, int height, int HP)
			: base(stage, x, y, width, height, HP)
		{
			this.defaultPosition = position;

            bindSize = new Vector2(130, 200);
            defBindPos = new Vector2(120, 50);//(100, 0);
            defBindPosOther = new Vector2(width - defBindPos.X - bindSize.X , 0);
            

			tmpPosition = defaultPosition + new Vector2(-150, -50);
			attackPosition = new Vector2(defaultPosition.X - 640, defaultPosition.Y - 50);
			singleLightning = new Weapon(stage, position.X, position.Y, 16, 200, this);					// アニメーションの関係でWeaponじゃ処理しきれないのでBeamに移行
			dividingLightning = new DivisionWeapon(stage, position.X, position.Y, 32, 32, this, 1.0f);
			obstacle = new Obstacle(stage, this, x, y, 32, 64, 0);
			ballTurret = new Turret(stage, this, position, 32, 32, 0, 0, 1, false, false, 0, 1);		// 他目的の雲object生成  , , 0
			ballTurret.bulletSpeed = new Vector2(0, 8);

			thunderTurret = new Turret(stage, this, this.position, 64, 48, 2, 0, 3, false, false, 3, 3, 14, 120, 10);//, , 3...2
			thunderTurret.isVisible = true;
			thunderTurret2 = new Turret(stage, this, this.position, 64, 48, 2, 0, 3, false, false, 3, 3, 14, 120, 10);//, , 3...2
			thunderTurret3 = new Turret(stage, this, this.position, 64, 48, 2, 3, 3, false, false, 3, 3, 14, 120, 10);//, , 3...2
            thunderTurret.isVisible = true; thunderTurret2.isVisible = true; thunderTurret3.isVisible = true;

			beamTurret = new Turret(stage, this, new Vector2(width / 2 - 16, height - 32), 32, 32, 1, 0, 1, true);//, , 2 //new Vector2(width / 2 + 32, height)
			thunderTurret8Way = new Turret(stage, this, this.position, 64, 48, 2, 3, 8, false, false, 3, 3, 14, 360, 30);//...3
            thunderTurret8Way.isVisible = true;

			for (int i = 0; i < 10; i++) {// 10
				thunderTurrets.Add(new Turret(stage, this, this.position, 64, 48, 2, 1, 5, false, false, 3, 3, 14, 240, 40));//...1 // 240
                thunderTurrets[i].isVisible = true;
            }
			thunderTurrets[0].isMarked = true;
			thunderTurrets3Way.Add(thunderTurret);
			thunderTurrets3Way.Add(thunderTurret2);
			thunderTurrets3Way.Add(thunderTurret3);
			turrets.Add(thunderTurret8Way);

			// Add them to turrets
			turrets.Add(ballTurret);
			turrets.Add(beamTurret);
			foreach (Turret tur in thunderTurrets) {
				turrets.Add(tur);
			}
			foreach (Turret tur in thunderTurrets3Way) {
				turrets.Add(tur);
			}

			obstacleNum = 10;
			for (int i = 0; i < obstacleNum; i++) {
				obstacles.Add(new Obstacle(stage, this, x, y, 32, 64, 0));//OdueOPSNOa
			}

			// Add them to this.weapons
			weapons.Add(singleLightning);
			weapons.Add(dividingLightning);
			weapons.Add(obstacle);
			foreach (Turret tur in turrets) weapons.Add(tur);
			foreach (Obstacle obs in obstacles) weapons.Add(obs);

			// Add weapons to stage.weapons
			foreach (Weapon weapon in weapons) stage.weapons.Add(weapon);
			foreach (Weapon weapon in weapons) stage.objects.Add(weapon);

			jumpingEnemy = new JumpingEnemy(stage, position.X, position.Y, 32, 32, 2, this);
			stage.characters.Add(jumpingEnemy);

			Initialize();
		}
コード例 #6
0
ファイル: Raijin.cs プロジェクト: ggand0/Tasrush-2DActionGame
        public Raijin(Stage stage, float x, float y, int width, int height, int HP)
            : base(stage, x, y, width, height, HP)
        {
            this.defaultPosition = position;

            bindSize        = new Vector2(130, 200);
            defBindPos      = new Vector2(120, 50);//(100, 0);
            defBindPosOther = new Vector2(width - defBindPos.X - bindSize.X, 0);


            tmpPosition            = defaultPosition + new Vector2(-150, -50);
            attackPosition         = new Vector2(defaultPosition.X - 640, defaultPosition.Y - 50);
            singleLightning        = new Weapon(stage, position.X, position.Y, 16, 200, this);                                          // アニメーションの関係でWeaponじゃ処理しきれないのでBeamに移行
            dividingLightning      = new DivisionWeapon(stage, position.X, position.Y, 32, 32, this, 1.0f);
            obstacle               = new Obstacle(stage, this, x, y, 32, 64, 0);
            ballTurret             = new Turret(stage, this, position, 32, 32, 0, 0, 1, false, false, 0, 1);            // 他目的の雲object生成  , , 0
            ballTurret.bulletSpeed = new Vector2(0, 8);

            thunderTurret           = new Turret(stage, this, this.position, 64, 48, 2, 0, 3, false, false, 3, 3, 14, 120, 10);  //, , 3...2
            thunderTurret.isVisible = true;
            thunderTurret2          = new Turret(stage, this, this.position, 64, 48, 2, 0, 3, false, false, 3, 3, 14, 120, 10);  //, , 3...2
            thunderTurret3          = new Turret(stage, this, this.position, 64, 48, 2, 3, 3, false, false, 3, 3, 14, 120, 10);  //, , 3...2
            thunderTurret.isVisible = true; thunderTurret2.isVisible = true; thunderTurret3.isVisible = true;

            beamTurret                  = new Turret(stage, this, new Vector2(width / 2 - 16, height - 32), 32, 32, 1, 0, 1, true); //, , 2 //new Vector2(width / 2 + 32, height)
            thunderTurret8Way           = new Turret(stage, this, this.position, 64, 48, 2, 3, 8, false, false, 3, 3, 14, 360, 30); //...3
            thunderTurret8Way.isVisible = true;

            for (int i = 0; i < 10; i++)                                                                                      // 10
            {
                thunderTurrets.Add(new Turret(stage, this, this.position, 64, 48, 2, 1, 5, false, false, 3, 3, 14, 240, 40)); //...1 // 240
                thunderTurrets[i].isVisible = true;
            }
            thunderTurrets[0].isMarked = true;
            thunderTurrets3Way.Add(thunderTurret);
            thunderTurrets3Way.Add(thunderTurret2);
            thunderTurrets3Way.Add(thunderTurret3);
            turrets.Add(thunderTurret8Way);

            // Add them to turrets
            turrets.Add(ballTurret);
            turrets.Add(beamTurret);
            foreach (Turret tur in thunderTurrets)
            {
                turrets.Add(tur);
            }
            foreach (Turret tur in thunderTurrets3Way)
            {
                turrets.Add(tur);
            }

            obstacleNum = 10;
            for (int i = 0; i < obstacleNum; i++)
            {
                obstacles.Add(new Obstacle(stage, this, x, y, 32, 64, 0));                //OdueOPSNOa
            }

            // Add them to this.weapons
            weapons.Add(singleLightning);
            weapons.Add(dividingLightning);
            weapons.Add(obstacle);
            foreach (Turret tur in turrets)
            {
                weapons.Add(tur);
            }
            foreach (Obstacle obs in obstacles)
            {
                weapons.Add(obs);
            }

            // Add weapons to stage.weapons
            foreach (Weapon weapon in weapons)
            {
                stage.weapons.Add(weapon);
            }
            foreach (Weapon weapon in weapons)
            {
                stage.objects.Add(weapon);
            }

            jumpingEnemy = new JumpingEnemy(stage, position.X, position.Y, 32, 32, 2, this);
            stage.characters.Add(jumpingEnemy);

            Initialize();
        }