Exemple #1
0
        //禿然出現用
        public void firedR2()
        {
            //怪物開火 - 對準英雄開火
            ball_M2 ballX = new ball_M2(new Vector2(GamePage.randObj.Next(20, 460), GamePage.randObj.Next(-240, -20)));

            GamePage.R_MFired.Add(ballX);
        }
Exemple #2
0
        //BOSS專用
        public void firedM2()
        {
            //怪物開火 - 對準英雄開火
            ball_M2 ballX = new ball_M2(this.V.centerLoc);

            ballX.ADD_X = (GamePage.R_HERO.centerLoc.X - this.V.centerLoc.X) / ((GamePage.R_HERO.centerLoc.Y - this.V.centerLoc.Y) / 2);
            GamePage.R_MFired.Add(ballX);
        }
Exemple #3
0
        public override void update()
        {
            //飄移怪物 血厚為防禦型怪獸  具備攻擊子彈功能 只會往前發射

            BOB_update();
            if (Dead)
            {
                return;
            }


            if (Y <= n)
            {
                Y += ADD_Y;
                return;
            }
            else
            {
                n = -50;
            }


            Rn--;
            if (Rn <= 0)
            {
                setTarget();
            }


            X += (targetLoc.X - X) / Rn;
            Y += (targetLoc.Y - Y) / Rn;



            //boss的攻擊*************
            if (FRIED.Time % 20 == 0)
            {
                this.firedM3();
            }

            if (FRIED.Time == 0)
            {
                this.firedRn(10);

                //該BOSS特殊攻擊位置
                ball_M2 ballX = new ball_M2(new Vector2(this.V.centerLoc.X, this.V.centerLoc.Y + 60));
                ballX.ADD_X = (GamePage.R_HERO.centerLoc.X - this.V.centerLoc.X) / ((GamePage.R_HERO.centerLoc.Y - this.V.centerLoc.Y) / 2);
                GamePage.R_MFired.Add(ballX);
                GamePage.effectballM2.Play(1f, -0.5f, 0f);

                FRIED.start();
            }

            FRIED.UPDATE();
        }
Exemple #4
0
        public override void update()
        {
            BOB_update();
            if (Dead)
            {
                return;
            }


            if (Y <= n)
            {
                Y += ADD_Y;
                return;
            }
            else
            {
                n = -500;
            }


            Rn--;
            if (Rn <= 0)
            {
                setTarget();
            }


            X += (targetLoc.X - X) / Rn;
            Y += (targetLoc.Y - Y) / Rn;

            //****************
            //左手右手一起移動

            RightHand.X = X + 315;
            RightHand.Y = Y + 120;

            LeftHand.X = X + 35;
            LeftHand.Y = Y + 170;

            if (LeftHand.Rotation >= M || LeftHand.Rotation <= -M)
            {
                M2 = !M2;
            }

            if (M2)
            {
                LeftHand.Rotation += 0.005f;
            }
            else
            {
                LeftHand.Rotation -= 0.005f;
            }

            //boss的攻擊*************
            if (FRIED.Time % 100 == 0)
            {
                if (GamePage.randObj.Next(0, 3) % 2 == 1)
                {
                    firedM3x3();
                }
                else
                {
                    this.firedM3Rn(8);
                }
            }



            if (FRIED.Time == 0)
            {
                this.callMonster("MONSTER1_A", 4 + GamePage.HERO_S);
                this.callMonster("MONSTER5", 3 + GamePage.HERO_S);
                this.callMonster("MONSTER51", 3 + GamePage.HERO_S);
                this.callMonster("MONSTER5_C", 2 + GamePage.HERO_S);
                //該BOSS特殊攻擊位置
                ball_M2 ballX = new ball_M2(new Vector2(this.V.centerLoc.X, this.V.centerLoc.Y + 60));
                ballX.ADD_X = (GamePage.R_HERO.centerLoc.X - this.V.centerLoc.X) / ((GamePage.R_HERO.centerLoc.Y - this.V.centerLoc.Y) / 2);
                GamePage.R_MFired.Add(ballX);
                GamePage.effectballM2.Play(1f, -0.5f, 0f);

                FRIED.start();

                hp += 5 + (20 * GamePage.HERO_S);//回血機制
            }

            FRIED.UPDATE();
        }