예제 #1
0
        public virtual void setTarget()
        {
            targetLoc = new Vector2(0, randObj.Next(MinY, MaxY));

            targetLoc.X = (randObj.Next(0, (int)(480 - V.Width)));
            Rn          = randObj.Next(30, 150);
            Rn2         = Rn;
        }
예제 #2
0
        public virtual void setTarget()
        {
            targetLoc = new Vector2(0, randObj.Next(MinY, MaxY));

            targetLoc.X  = (GamePage.R_HERO.centerLoc.X - randObj.Next(-120, 120));
            targetLoc.X -= (V.Width / 2);
            Rn           = randObj.Next(30, 150);
            Rn2          = Rn;
        }
예제 #3
0
 public BG(Texture2D IMG)
 {
     n  += GamePage.HERO_LV;
     v  += GamePage.HERO_LV * 0.1f;
     img = IMG;
     for (int i = 0; i < n; i++)
     {
         Stars.Add(new TARY_VIMG(img, new Vector2(randObj.Next(0, 480), randObj.Next(0, 800))));
         Stars[i].Size = randObj.Next(1, 5);
     }
 }
예제 #4
0
        public void setTarget()
        {
            targetLoc = new Vector2(randObj.Next(0, (int)(480 - V.Width)), randObj.Next(MinY, MaxY));

            if (Auto)
            {
                targetLoc.X = (GamePage.R_HERO.centerLoc.X - randObj.Next(-150, 150));
            }


            Rn  = randObj.Next(30, 90);
            Rn2 = Rn;
        }
예제 #5
0
 public override void info()
 {
     //**父類別基礎屬性****
     SCORE = 98; //擊倒分數
     HP    = 3;  //怪物血量
     ADD_X = 0f; //物件位移
     ADD_Y = 2;  //物件位移
     //*************
     randObj = GamePage.randObj;
     n       = randObj.Next(300, 400); //y前進多少 開始發動捨身攻擊
     sec     = 60;                     //幾秒發動射擊
 }
예제 #6
0
        public override void update()
        {
            V.Rotation += 0.05f;

            //凸然出現的怪獸  出現後 鎖定英雄身捨攻擊

            BOB_update();

            //第一階段*****保護怪獸 並且閃閃怪獸
            if (n >= 0)
            {
                n--;
                if (n % 2 == 1)
                {
                    V.Alpha = 0f;
                }
                else
                {
                    V.Alpha = 1000f;
                }
                return;
            }


            //第二階段*****停止並計算英雄目標,"準備"開始衝刺
            if (Timer == null)
            {
                Timer        = new TARY_TIMER(0, sec);
                targetLoc    = GamePage.R_HERO.centerLoc;
                targetLoc.X -= V.Width / 2;
                targetLoc.X += randObj.Next(-100, 100);
                targetLoc.Y  = 850;

                Timer.start();
                V.imgptr++;
            }


            if (Timer.getT)
            {
                Timer.UPDATE();
                return;
            }



            //第三階段*****開始衝刺
            X += (targetLoc.X - X) / 16;
            Y += (targetLoc.Y - Y) / 16;
        }
예제 #7
0
        public override void update()
        {
            V.Rotation += 0.05f;
            //追蹤鎖定英雄的怪物 若怪被擊中就觸發鎖定事件

            BOB_update();

            //第一階段*****前進觸發範圍
            if (Y <= n)
            {
                Y += ADD_Y;
                return;
            }


            //第二階段*****停止並計算英雄目標,"準備"開始衝刺
            if (Timer == null)
            {
                Timer        = new TARY_TIMER(0, sec);
                targetLoc    = GamePage.R_HERO.centerLoc;
                targetLoc.X -= V.Width / 2;
                targetLoc.X += randObj.Next(-100, 100);
                targetLoc.Y  = 850;

                Timer.start();

                V.imgptr++;//怪物變色
            }
            if (Timer.getT)
            {
                Timer.UPDATE();
                return;
            }



            //第三階段*****開始衝刺
            X += (targetLoc.X - X) / 16;
            Y += (targetLoc.Y - Y) / 16;
        }
예제 #8
0
        public override void update()
        {
            V.Rotation += 0.05f;

            //亂槍射擊的怪物 若怪被擊中就觸發亂鎖定發射

            BOB_update();

            //第一階段*****前進觸發範圍
            if (Y <= n)
            {
                Y += ADD_Y;
                return;
            }


            //第二階段*****停止並計算英雄目標,"準備"開始衝刺
            if (Timer == null)
            {
                Timer       = new TARY_TIMER(0, sec);
                targetLoc.X = randObj.Next(-20, 480);
                targetLoc.Y = 850;

                Timer.start();
                V.imgptr++;
            }
            if (Timer.getT)
            {
                Timer.UPDATE();
                return;
            }



            //第三階段*****開始衝刺
            X += (targetLoc.X - X) / 16;
            Y += (targetLoc.Y - Y) / 16;
        }
예제 #9
0
 public virtual void setTarget()
 {
     targetLoc = new Vector2(randObj.Next(-20, (int)(480)), randObj.Next(MinY, MaxY));
     Rn        = randObj.Next(Nmin, Nmax);
     Rn2       = Rn;
 }