public Stage03() { music = new Music("stage03.mp3"); turn = new TurnPage(); countTime = new CountTime(); river = new AnimateActor("river", 14, new Point(560, 550), 2.3f); river2 = new AnimateActor("river", 14, new Point(560, 550), 2.3f); background = new ContinuousActor("GridWall", 4, new Point(100, 340), 1f, 880, 100, 0); grid = new ContinuousActor("grid", 4, new Point(195, 700), 2, 500, 100, 0); winroad = new AnimateActor("finish", 1, new Point(1820, 530), 1.8f); //520到底 mainCharacter = new MainCharactor("dragon", 3, new Point(420, 430), 8); // size 6 pinkDragon = new PinkDragon("Pinkdragon", 3, new Point(1990, 550), 6); yellowDragon = new YellowDragon[yellow_NUM]; healthPts = new HealthPt[yellow_NUM]; for (int i = 0; i < yellow_NUM; i++) { yellowDragon[i] = new YellowDragon("yellowdragon", 2, new Point(555, 600), 4); healthPts[i] = new HealthPt("ProgressBar10", 1, new Point(1200, 500 + 100 * i), 4); } // 說明頁物件 explain = new AnimateActor("story31", 1, new Point(550, 410), 2); rNextBtn = new AnimateActor("Rnext", 1, new Point(1000, 430), 1.3f); ExplainPlayBtn = new AnimateActor("exPlay", 1, new Point(550, 630), 1); // 550 600 lNextBtn = new AnimateActor("graExpLBtn0", 1, new Point(100, 430), 1.3f); Global.target = yellowDragon[0].Enemys + yellowDragon[1].Enemys; }
public void MouseDown(MouseEventArgs e) { switch (step) { // 說明頁 case 0: // 說明頁按鈕切換 if (rNextBtn.isClick(e.X, e.Y) && (explainPage == 0 || explainPage == 1 || explainPage == 2)) { music.PlayMusic("concern.mp3"); explainPage++; rNextBtn.Size = 1.5f; } if (lNextBtn.isClick(e.X, e.Y) && (explainPage == 1 || explainPage == 2 || explainPage == 3)) { music.PlayMusic("concern.mp3"); explainPage--; lNextBtn.Size = 1.5f; } // 說明頁 子頁 切換 switch (explainPage) { case 0: explain.ClearImages(); explain.AddImage("story31", 1); lNextBtn.ClearImages(); lNextBtn.AddImage("graExpLBtn0", 1); rNextBtn.ClearImages(); rNextBtn.AddImage("Rnext", 1); break; case 1: explain.ClearImages(); explain.AddImage("Stage03explain0", 1); lNextBtn.ClearImages(); lNextBtn.AddImage("Lnext", 1); rNextBtn.ClearImages(); rNextBtn.AddImage("Rnext", 1); // mainCharacter位置重設 mainCharacter.Size = 8; mainCharacter.Center = new Point(420, 430); mainCharacter.Motion(0); if (mainCharacter.isClick(e.X, e.Y)) { mainCharacter.ispower = true; music.PlayMusic("Power.mp3"); mainCharacter.Motion(5); } mainCharacter.isjump = false; break; case 2: explain.ClearImages(); explain.AddImage("Stage03explain1", 1); rNextBtn.ClearImages(); rNextBtn.AddImage("Rnext", 1); lNextBtn.ClearImages(); lNextBtn.AddImage("Lnext", 1); // mainCharacter位置重設 mainCharacter.Size = 8; mainCharacter.Center = new Point(565, 550); mainCharacter.Motion(2); break; case 3: explain.ClearImages(); explain.AddImage("Stage03explain2", 1); rNextBtn.ClearImages(); rNextBtn.AddImage("graExpRBtn0", 1); lNextBtn.ClearImages(); lNextBtn.AddImage("Lnext", 1); if (yellowDragon[0].isClick(e.X, e.Y)) { yellowDragon[0].Motion(1); } break; } if (ExplainPlayBtn.isClick(e.X, e.Y)) { music.PlayMusic("concern.mp3"); ExplainPlayBtn.Size = 1.2f; explain = null; ExplainPlayBtn = null; // mainCharater 位置、 圖片重設 mainCharacter.Size = 6; mainCharacter.Center = new Point(190, 590); mainCharacter.Motion(0); // river 、 river2 位置、圖片重設 river.Size = 1; river.Center = new Point(500, 750); river2.Size = 1; river2.Center = new Point(500, 750); // yellowDragon 位置、圖片重設 for (int i = 0; i < yellow_NUM; i++) { yellowDragon[i] = new YellowDragon("yellowdragon", 2, new Point(1200, 500 + 100 * i), 3); } step = 1; } break; case 1: //攻擊敵人 for (int i = 0; i < yellow_NUM; i++) { if (yellowDragon[i] != null) { if (yellowDragon[i].isClick(e.X, e.Y)) { yellowDragon[i].Life(); yellowDragon[i].Motion(1); } } } //續力開始 if (mainCharacter.isClick(e.X, e.Y) && mainCharacter.Center.Y > 545 && touch > 0 && !mainCharacter.isjump) { music.PlayMusic("Power.mp3"); mainCharacter.ispower = true; mainCharacter.Motion(5); } break; //遊戲敗場 case 3: turn.MouseDown(e, pageName.turntablePage); break; } }
int actorChange = 0; // 角色瀏覽標籤 //------------ TurnTableStage 建構子 ----------// public TurnTableStage() { turn = new TurnPage(); ranker = new Ranker(); music = new Music(5); turnTable = new TurnTable(); click = 1; Global.TIME = 0; ranker.Load(); wood = new Actor("wood", new Point(250, 390), 0.9f); background = new Actor("mainpageBackground", new Point(550, 394), 1.5f); rankpic = new Button("rank0", 1, new Point(795, 350), 1.3f); Page = new Button("redPage", 1, new Point(760, 365), 1.06f); redButton = new Button("redButton0", 2, new Point(150, 160), 1.5f); blueButton = new Button("blueButton0", 2, new Point(150, 460), 1.5f); greenButton = new Button("greenButton0", 2, new Point(250, 310), 1.5f); purpleButton = new Button("purpleButton0", 2, new Point(250, 610), 1.5f); nextButtonLeft = new AnimateActor("nextButton0", 1, new Point(710, 670), 13); nextButtonRight = new AnimateActor("nextButton1", 1, new Point(805, 670), 13); intro0 = new AnimateActor("intro0", 1, new Point(765, 200), 1); intro1 = new AnimateActor("intro1", 1, new Point(765, 200), 1); intro2 = new AnimateActor("intro2", 1, new Point(765, 200), 1); intro3 = new AnimateActor("intro3", 1, new Point(765, 200), 1); intro4 = new AnimateActor("intro4", 1, new Point(765, 200), 1); intro5 = new AnimateActor("intro5", 1, new Point(765, 200), 1); intro6 = new AnimateActor("intro6", 1, new Point(765, 200), 1); greenDragon = new MainCharactor("dragon", 2, new Point(775, 500), 4.5f); orangeDragon = new OrangeDragon("orangedragon", 2, new Point(770, 500), 2.5f); bird = new YellowBird("YellowBird_Hit", 3, new Point(775, 500), 2.5f); tinyDragon = new TinyDragon("tinyDragon", 3, new Point(760, 500), 2f); brownDragon = new AnimateActor("browndragon", 2, new Point(750, 500), 2.5f); blackDragon = new BlackDragon("blackdragon", 2, new Point(735, 500), 5); yellowDragon = new YellowDragon("yellowdragon", 2, new Point(755, 500), 2.5f); nameTextbox = new TextBox(); SetNameTextbox(); pageLabel = new Label(); SetPageLabel(); turnLabel = new Label(); SetTurnLabel(); mode01 = new AnimateActor("Mode0", 1, new Point(550, 600), 2f); mode02 = new AnimateActor("Mode1", 1, new Point(760, 600), 2f); storyMode = new AnimateActor("Story0", 1, new Point(970, 600), 2f);; storyModeExplain = new AnimateActor("modeStory0", 1, new Point(750, 335), 2.55f); cloud = new AnimateActor("cloud", 1, new Point(760, 55), 1); // 模式按鈕 switch (Global.Mode) { case 0: rBtn0 = new AnimateActor("rrBtn0", 1, new Point(550, 175), 1.5f); rBtn1 = new AnimateActor("rBtn1", 1, new Point(750, 175), 1.5f); rBtn2 = new AnimateActor("rBtn2", 1, new Point(960, 175), 1.5f); break; case 1: rBtn0 = new AnimateActor("rBtn0", 1, new Point(550, 175), 1.5f); rBtn1 = new AnimateActor("rrBtn1", 1, new Point(750, 175), 1.5f); rBtn2 = new AnimateActor("rBtn2", 1, new Point(960, 175), 1.5f); break; case 2: rBtn0 = new AnimateActor("rBtn0", 1, new Point(550, 175), 1.5f); rBtn1 = new AnimateActor("rBtn1", 1, new Point(750, 175), 1.5f); rBtn2 = new AnimateActor("rrBtn2", 1, new Point(960, 175), 1.5f); break; } }