public BOSS3(Vector2 loc) : base(loc) { V = new TARY_VIMG(GamePage.picBOSS3, loc); V.H.Radius = (V.Height / 2) - 15; FRIED.start(); Mtype = false;//代表為boss 分貝變高 }
public BOSS6(Vector2 loc) : base(loc) { V = new TARY_VIMG(GamePage.picBOSS6, loc); V.H.Radius = 80; FRIED.start(); Mtype = false;//代表為boss 分貝變高 }
public BOSS1(Vector2 loc) : base(loc) { V = new TARY_VIMG(GamePage.picBOSS1, loc); V.H.Radius = (V.Width / 2) - 10; FRIED.start(); Mtype = false;//代表為boss 分貝變高 }
public BOSS4(Vector2 loc) : base(loc) { V = new TARY_VIMG(GamePage.picBOSS4, loc); LeftHand = new TARY_VIMG(GamePage.picBOSS4_LEFT, new Vector2(0, 0)); RightHand = new TARY_VIMG(GamePage.picBOSS4_RIGHT, new Vector2(0, 0)); LeftHand.CenterPoint = true; V.H.Radius = 60; FRIED.start(); Mtype = false;//代表為boss 分貝變高 }
bool leave = false;//落跑訊號 public BOSS5(Vector2 loc) : base(loc) { V = new TARY_VIMG(GamePage.picBOSS5, loc); V.stop(); V.imgptr = RunPtr; V.H.Radius = (V.Height / 2) - 10; FRIED.start(); Mtype = false;//代表為boss 分貝變高 }
protected void heroUpdate() { if (ProHero.getT) { //英雄被擊中~ 保護英雄秒數 ProHero.UPDATE(); if (ProHero.Time % 2 == 1) { hero.Alpha = 0f; } else { hero.Alpha = 1000f; } return; } L = GamePage.R_LV.HPlossX(hero.H, 50); if (L != 0) { //人物被擊中 人扣血、怪扣血 Hp.hp -= L; //被怪擊中 星星徽章消失 GamePage.R_BAR.PowerLv--; GamePage.effectHerofired.Play(); ProHero.start();//啟動防護機制 } if (Hp.hp <= 0) { dead = true;//腳色死亡 } }
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; }
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; }
public GAME_END() { Time = new TARY_TIMER(1, 350); Time.start(); GAMEEND = new TARY_VIMG(GamePage.picGAMEEND, new Vector2(15, 140)); GAMEEND.Size = 2; GAMESCORE = new TARY_VIMG(GamePage.picSCORE, new Vector2(60, 300)); GAMESCORE.Size = 2; SCORE = new TARY_SCORE(GamePage.picNum, new Vector2(150, 300)); SCORE.Score = GamePage.HERO_SCORE; SCORE.Size = 2; SCORE.ScoreV = 7; for (int i = 0; i < bob.Count(); i++) { switch (GamePage.randObj.Next(1, 8)) { case 1: ColorStar = GamePage.picStar7; break; //白色為6 star1為背景色 case 2: ColorStar = GamePage.picStar2; break; case 3: ColorStar = GamePage.picStar3; break; case 4: ColorStar = GamePage.picStar4; break; case 5: ColorStar = GamePage.picStar5; break; case 6: ColorStar = GamePage.picStar6; break; case 7: ColorStar = GamePage.picStar8; break; } bob[i] = new TARY_BOB(ColorStar, new Vector2(GamePage.randObj.Next(10, 470), GamePage.randObj.Next(10, 750)), GamePage.randObj.Next(15, 80)); } }
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; }
int GP = 0;//若是重生 將編制 第幾群組 public MENU_DEAD(int gp) { GamePage.HERO_LIFE--; GP = gp; HERO = new TARY_VIMG(GamePage.picHERO, new Vector2(180, 280)); LIFE = new TARY_SCORE(GamePage.picNum, new Vector2(240, 280)); LIFE.Prefix = "× "; LIFE.Score = GamePage.HERO_LIFE; GAMEOVER = new TARY_VIMG(GamePage.picGAMEOVER, new Vector2(90, 150)); GAMESCORE = new TARY_VIMG(GamePage.picSCORE, new Vector2(40, 400)); GAMESCORE.Size = 2; SCORE = new TARY_SCORE(GamePage.picNum, new Vector2(200, 400)); SCORE.Score = GamePage.HERO_SCORE; SCORE.Size = 2; SCORE.ScoreV = 7; Time = new TARY_TIMER(1, 200); Time.start(); }