Beispiel #1
0
        public void firedM3x5()
        {
            //怪物開火 - 直線
            ball_M3 ballX1 = new ball_M3(this.V.centerLoc);

            GamePage.R_MFired.Add(ballX1);


            ball_M3 ballX2 = new ball_M3(this.V.centerLoc);

            ballX2.ADD_X -= 0.5f;
            GamePage.R_MFired.Add(ballX2);


            ball_M3 ballX3 = new ball_M3(this.V.centerLoc);

            ballX3.ADD_X += 0.5f;
            GamePage.R_MFired.Add(ballX3);



            ball_M3 ballX4 = new ball_M3(this.V.centerLoc);

            ballX4.ADD_X += 1.2f;
            GamePage.R_MFired.Add(ballX4);



            ball_M3 ballX5 = new ball_M3(this.V.centerLoc);

            ballX5.ADD_X -= 1.2f;
            GamePage.R_MFired.Add(ballX5);
        }
Beispiel #2
0
        public void firedR3()
        {
            //怪物開火 - 對準英雄開火
            ball_M3 ballX = new ball_M3(new Vector2(GamePage.randObj.Next(20, 460), GamePage.randObj.Next(-240, -5)));

            GamePage.R_MFired.Add(ballX);
        }
Beispiel #3
0
        //小怪專用
        public void firedM3()
        {
            //怪物開火 - 對準英雄開火
            ball_M3 ballX = new ball_M3(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);
        }
Beispiel #4
0
        public void firedM3x3()
        {
            ball_M3 ballX1 = new ball_M3(this.V.centerLoc);

            GamePage.R_MFired.Add(ballX1);


            ball_M3 ballX2 = new ball_M3(this.V.centerLoc);

            ballX2.ADD_X -= 0.5f;
            GamePage.R_MFired.Add(ballX2);



            ball_M3 ballX3 = new ball_M3(this.V.centerLoc);

            ballX3.ADD_X += 0.5f;
            GamePage.R_MFired.Add(ballX3);
        }
Beispiel #5
0
        public void firedM3Rn(int n)
        {
            //怪物爆炸 - 隨機朝著四面八方

            for (int i = 0; i < n; i++)
            {
                int     p      = GamePage.randObj.Next(0, 5);
                ball_M3 ballX1 = new ball_M3(this.V.centerLoc);



                if (p == 0 || p == 1)
                {
                    ballX1.ADD_Y = -3.5f;
                    ballX1.ADD_X = GamePage.randObj.Next(-30, 30) * 0.1f;
                }
                else if (p == 2 || p == 3)
                {
                    ballX1.ADD_Y = 3.5f;
                    ballX1.ADD_X = GamePage.randObj.Next(-30, 30) * 0.1f;
                }
                else
                {
                    if (GamePage.randObj.Next(0, 2) == 0)
                    {
                        ballX1.ADD_X = GamePage.randObj.Next(30, 35) * 0.1f;
                    }
                    else
                    {
                        ballX1.ADD_X = GamePage.randObj.Next(30, 35) * -0.1f;
                    }

                    ballX1.ADD_Y = 0;
                }

                GamePage.R_MFired.Add(ballX1);
            }//for
        }