public override void OnPrepareNewGame() { base.OnPrepareNewGame(); m_kingMoive = Game.Createlayer(0, 0, "moive", "game.asset.living.BossBgAsset", "out", 1, 1, 0); m_kingFront = Game.Createlayer(630, 400, "font", "game.asset.living.ClanBrotherAsset", "out", 1, 1, 0); seconBoss = Game.CreateBoss(bossSecondID, 1352, 300, -1, 1); firstBoss = Game.CreateBoss(bossFrontID, 241, 300, 1, 1); Game.AddAction(new ShowBloodItem(firstBoss.Id, 0, 0)); Game.AddAction(new ShowBloodItem(seconBoss.Id, 7000, 0)); seconBoss.FallFrom(1352, 346, "fall", 0, 2, 1000); firstBoss.FallFrom(241, 346, "fall", 0, 2, 1000); firstBoss.SetRelateDemagemRect(-12, -52, 26, 38); firstBoss.Degree = 1; firstBoss.Say(LanguageMgr.GetTranslation("GameServerScript.AI.Messions.TTSM3303.msg1"), 0, 3000); firstBoss.PlayMovie("call", 3000, 0); firstBoss.AddDelay(16); Game.AddAction(new FocusAction(1352, 346, 0, 7000, 1000)); seconBoss.SetRelateDemagemRect(-12, -52, 26, 38); seconBoss.Degree = 2; seconBoss.Say(LanguageMgr.GetTranslation("GameServerScript.AI.Messions.TTSM3303.msg2"), 0, 9000); seconBoss.PlayMovie("castA", 9000, 0); Game.AddAction(new FocusAction(800, 500, 0, 13000, 1000)); seconBoss.AddDelay(16); m_kingMoive.PlayMovie("in", 15000, 0); m_kingFront.PlayMovie("in", 15000, 0); m_kingMoive.PlayMovie("out", 20000, 0); m_kingFront.PlayMovie("out", 20400, 0); }
public override void OnPrepareNewGame() { base.OnPrepareNewGame(); //动态设置关卡回合数上线 Game.TotalCount = Game.PlayerCount; Game.TotalTurn = Game.PlayerCount * 4; Game.SendMissionInfo(); //这里需要随机,有多少个人,就随机多少次,设置State=1的木板 // CreatePhysicalObj(int x, int y,string name, string model, string defaultAction, int scale, int rotation) m_bord.Add(Game.CreatePhysicalObj(76, 167, "board1", "game.crazytank.assetmap.Board001", "1", 1, 1, 336)); m_bord.Add(Game.CreatePhysicalObj(403, 159, "board2", "game.crazytank.assetmap.Board001", "1", 1, 1, 23)); m_bord.Add(Game.CreatePhysicalObj(699, 156, "board3", "game.crazytank.assetmap.Board001", "1", 1, 1, 350)); m_bord.Add(Game.CreatePhysicalObj(959, 148, "board4", "game.crazytank.assetmap.Board001", "1", 1, 1, 325)); m_bord.Add(Game.CreatePhysicalObj(177, 261, "board5", "game.crazytank.assetmap.Board001", "1", 1, 1, 22)); m_bord.Add(Game.CreatePhysicalObj(514, 277, "board6", "game.crazytank.assetmap.Board001", "1", 1, 1, 336)); m_bord.Add(Game.CreatePhysicalObj(782, 285, "board7", "game.crazytank.assetmap.Board001", "1", 1, 1, 23)); m_bord.Add(Game.CreatePhysicalObj(1061, 280, "board8", "game.crazytank.assetmap.Board001", "1", 1, 1, 22)); m_bord.Add(Game.CreatePhysicalObj(274, 406, "board9", "game.crazytank.assetmap.Board001", "1", 1, 1, 350)); m_bord.Add(Game.CreatePhysicalObj(621, 409, "board10", "game.crazytank.assetmap.Board001", "1", 1, 1, 23)); m_bord.Add(Game.CreatePhysicalObj(873, 414, "board11", "game.crazytank.assetmap.Board001", "1", 1, 1, 336)); m_bord.Add(Game.CreatePhysicalObj(1155, 428, "board12", "game.crazytank.assetmap.Board001", "1", 1, 1, 336)); m_door = Game.CreatePhysicalObj(1275, 556, "door", "game.crazytank.assetmap.CrystalDoor001", "start", 1, 1, 0); int[] num = new int[] { 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12 }; for (int i = 0; i < Game.TotalCount; i++) { int index = Game.Random.Next(0, 12); if (num[index] == index) { i--; } else { num[index] = index; m_bord.ToArray()[index].PlayMovie("2", 0, 0); keyIndex = string.Format("Key{0}", index); m_key.Add(Game.CreatePhysicalObj(m_bord.ToArray()[index].X, m_bord.ToArray()[index].Y - 8, keyIndex, "game.crazytank.assetmap.Key", "1", 1, 1, 0)); Game.SendGameObjectFocus(1, m_bord.ToArray()[index].Name, 0, 0); } } Game.SendGameObjectFocus(1, "door", 1000, 0); List <LoadingFileInfo> loadingFileInfos = new List <LoadingFileInfo>(); loadingFileInfos.Add(new LoadingFileInfo(2, "sound/Sound201.swf", "Sound201")); loadingFileInfos.Add(new LoadingFileInfo(2, "sound/Sound202.swf", "Sound202")); Game.SendLoadResource(loadingFileInfos); Game.GameOverResources.Add("game.crazytank.assetmap.CrystalDoor001"); Game.BossCardCount = 1; }
internal void SendAddPhysicalObj(PhysicalObj obj) { GSPacketIn pkg = new GSPacketIn((byte)ePackageType.GAME_CMD); pkg.WriteByte((byte)eTankCmdType.ADD_BOX); pkg.WriteInt(obj.Id); pkg.WriteInt(obj.Type); pkg.WriteInt(obj.X); pkg.WriteInt(obj.Y); pkg.WriteString(obj.Model); pkg.WriteString(obj.CurrentAction); pkg.WriteInt(obj.Scale); pkg.WriteInt(obj.Scale); pkg.WriteInt(obj.Rotation); pkg.WriteInt(0); pkg.WriteInt(0); //var id:int = evt.pkg.readInt(); //var type:int = evt.pkg.readInt(); //var px:int = evt.pkg.readInt(); //var py:int = evt.pkg.readInt(); //var model:String = evt.pkg.readUTF(); //var action:String = evt.pkg.readUTF(); //var pscaleX:int = evt.pkg.readInt(); //var pscaleY:int = evt.pkg.readInt(); //var protation:int = evt.pkg.readInt(); //var layer:int = evt.pkg.readInt(); SendToAll(pkg); }
public override void OnPrepareNewGame() { base.OnPrepareNewGame(); m_kingMoive = Game.Createlayer(0, 0, "moive", "game.asset.living.BossBgAsset", "out", 1, 1, 0); m_kingFront = Game.Createlayer(900, 200, "font", "game.asset.living.boguoLeaderAsset", "out", 1, 1, 0); Game.AddAction(new FocusAction(350, 0, 0, 150, 1000)); hawkBoss = Game.CreateWingBoss(hawkBossID, 800, 300, -1, 0); hawkBoss.SetRelateDemagemRect(-30, -75, 60, 70); hawkBoss.Degree = 1; hawkBoss.Say("沙漠神鹰就是我了,要签名的赶快过来~", 0, 3000); hawkBoss.AddDelay(16); Game.AddAction(new FocusAction(1000, 400, 0, 7000, 1000)); wolfBoss = Game.CreateBoss(wolfBossID, 1000, 400, -1, 0); wolfBoss.FallFrom(1000, 450, "fall", 0, 2, 1000); wolfBoss.SetRelateDemagemRect(-116, -111, 157, 119); wolfBoss.Degree = 2; wolfBoss.Say("沙漠血狼就是我了,要签名的赶快过来~", 0, 9000); wolfBoss.AddDelay(16); m_kingMoive.PlayMovie("in", 15000, 0); m_kingFront.PlayMovie("in", 15000, 0); m_kingMoive.PlayMovie("out", 20000, 0); m_kingFront.PlayMovie("out", 20400, 0); }
internal void SendRemovePhysicalObj(PhysicalObj obj) { GSPacketIn pkg = new GSPacketIn((byte)ePackageType.GAME_CMD); pkg.WriteByte((byte)eTankCmdType.DISAPPEAR); pkg.WriteInt(obj.Id); SendToAll(pkg); //TODO 完成删除物品 }
internal void SendPhysicalObjPlayAction(PhysicalObj obj) { GSPacketIn pkg = new GSPacketIn((byte)ePackageType.GAME_CMD); pkg.WriteByte((byte)eTankCmdType.UPDATE_BOARD_STATE); pkg.WriteInt(obj.Id); pkg.WriteString(obj.CurrentAction); SendToAll(pkg); }
public virtual void AddPhysicalTip(PhysicalObj phy, bool sendToClient) { m_map.AddPhysical(phy); phy.SetGame(this); if (sendToClient) { SendAddPhysicalTip(phy); } }
public void RemovePhysicalObj(PhysicalObj phy, bool sendToClient) { m_map.RemovePhysical(phy); phy.SetGame(null); if (sendToClient) { SendRemovePhysicalObj(phy); } }
public override void OnStartGame() { base.OnStartGame(); for (int i = 0; i < 4; i++) { SomeNpc.Add(Game.CreateNpc(201, (i + 1) * 100, 500, 1)); } SomeNpc.Add(Game.CreateNpc(202, 500, 500, 1)); Tip = Game.CreateTip(390, 120, "firstFront", "com.map.trainer.TankTrainerAssetII", "Empty", 1, 0); }
public override void OnPrepareNewGame() { base.OnPrepareNewGame(); eyeObj = Game.CreatePhysicalObj(977, 163, "eyeObj", "game.crazytank.assetmap.WeiredEye", "1", 1, 1, 0); doorObj = Game.CreatePhysicalObj(1394, 715, "doorObj", "game.crazytank.assetmap.Gate", "1", 1, 1, 0); Game.AddAction(new FocusAction(977, 163, 0, 150, 0)); Game.AddAction(new FocusAction(1394, 715, 0, 3000, 0)); Game.AddAction(new LivingCallFunctionAction(null, Createbattle, 4000)); }
public override void OnPrepareNewGame() { base.OnPrepareNewGame(); m_kingMoive = Game.Createlayer(0, 0, "kingmoive", "game.asset.living.BossBgAsset", "out", 1, 1, 0); m_front = Game.Createlayer(710, 380, "font", "game.asset.living.BombKingAsset", "out", 1, 1, 0); m_king = Game.CreateBoss(bossID, 888, 590, -1, 0); m_king.FallFrom(888, 690, "fall", 0, 2, 1000); m_king.SetRelateDemagemRect(-41, -187, 83, 140); m_kingMoive.PlayMovie("in", 1000, 0); m_front.PlayMovie("in", 2000, 2000); m_king.AddDelay(16); }
public override void OnPrepareNewGame() { base.OnPrepareNewGame(); this.m_moive = base.Game.Createlayer(0, 0, "moive", "game.asset.living.BossBgAsset", "out", 1, 1, 0); this.m_front = base.Game.Createlayer(1131, 150, "font", "game.asset.living.AntQueenAsset", "out", 1, 1, 0); this.boss = base.Game.CreateBoss(this.bossID, 912, 486, -1, 1); this.boss.SetRelateDemagemRect(-42, -200, 84, 194); this.boss.Say(LanguageMgr.GetTranslation("GameServerScript.AI.Messions.DCNM2102.msg1", new object[0]), 0, 200, 0); this.m_moive.PlayMovie("in", 6000, 0); this.m_front.PlayMovie("in", 6100, 0); this.m_moive.PlayMovie("out", 10000, 1000); this.m_front.PlayMovie("out", 9900, 0); }
private void ProtectingWall() { if (isEixt == 0) { m_wallLeft = ((PVEGame)Game).CreatePhysicalObj(Body.X - 15, 620, "wallLeft", "com.mapobject.asset.WaveAsset_01_left", "1", 1, 1, 0); m_wallRight = ((PVEGame)Game).CreatePhysicalObj(Body.X + 15, 620, "wallRight", "com.mapobject.asset.WaveAsset_01_right", "1", 1, 1, 0); m_wallLeft.SetRect(-165, -169, 43, 330); m_wallRight.SetRect(128, -165, 41, 330); isEixt = 1; } int index = Game.Random.Next(0, WallChat.Length); Body.Say(WallChat[index], 1, 0); }
public override void OnBeginNewTurn() { base.OnBeginNewTurn(); if (m_kingMoive != null) { Game.RemovePhysicalObj(m_kingMoive, true); m_kingMoive = null; } if (m_front != null) { Game.RemovePhysicalObj(m_front, true); m_front = null; } }
public override void OnPrepareNewGame() { base.OnPrepareNewGame(); m_moive = Game.Createlayer(0, 0, "moive", "game.asset.living.BossBgAsset", "out", 1, 1, 0); m_front = Game.Createlayer(1131, 150, "font", "game.asset.living.AntQueenAsset", "out", 1, 1, 0); boss = Game.CreateBoss(bossID, 1316, 444, -1, 1); boss.SetRelateDemagemRect(-42, -200, 84, 194); boss.Say(LanguageMgr.GetTranslation("GameServerScript.AI.Messions.DCSM2002.msg1"), 0, 200, 0); m_moive.PlayMovie("in", 6000, 0); m_front.PlayMovie("in", 6100, 0); m_moive.PlayMovie("out", 10000, 1000); m_front.PlayMovie("out", 9900, 0); }
private void BakeAttack() { List <Player> players = Game.GetAllLivingPlayers(); foreach (Player player in players) { if (player.IsLiving) { player.AddEffect(new ContinueReduceBloodEffect(400, 3, null), 0); PhysicalObj obj = ((PVEGame)Body.Game).CreatePhysicalObj(player.X - 20, 500, "Flame", "game.assetmap.Flame", "1", 1, 1, 0, 1); m_Physical.Add(obj); } } Body.CallFuction(new LivingCallBack(ClearFlame), 1800); }
private void BeginCarry() { foreach (Player player in Game.GetAllFightPlayers()) { if (player.IsLiving) { int x = Game.Random.Next(50, 1400); PhysicalObj obj = ((PVEGame)Body.Game).CreatePhysicalObj(x - 20, 500, "Flame", "game.assetmap.Flame", "1", 1, 1, 0, 1); m_Physical.Add(obj); ((PVEGame)Body.Game).AddAction(new LivingBoltMoveAction(player, x, 500, "", 0, 0)); } } Body.CurrentDamagePlus = 0.8f; Body.RangeAttacking(-1, Game.Map.Info.ForegroundWidth + 1, "cry", 0, null); }
public override void OnBeginNewTurn() { base.OnBeginNewTurn(); if (base.Game.TurnIndex > 1) { if (this.m_moive != null) { base.Game.RemovePhysicalObj(this.m_moive, true); this.m_moive = null; } if (this.m_front != null) { base.Game.RemovePhysicalObj(this.m_front, true); this.m_front = null; } } }
public override void OnPrepareNewGame() { base.OnPrepareNewGame(); m_kingMoive = Game.Createlayer(0, 0, "moive", "game.asset.living.BossBgAsset", "out", 1, 1, 0); m_kingFront = Game.Createlayer(900, 300, "font", "game.asset.living.boguoLeaderAsset", "out", 1, 1, 0); cattleBoss = Game.CreateBoss(bossID, 1000, 450, -1, 0); cattleBoss.FallFrom(1000, 500, "fall", 0, 2, 1000); cattleBoss.SetRelateDemagemRect(-35, -130, 70, 130); cattleBoss.Say("我就是老牛!你们就是嫩草!", 0, 3000); cattleBoss.ChangeMaxBeatDis = 1500; cattleBoss.AddDelay(16); m_kingMoive.PlayMovie("in", 8000, 0); m_kingFront.PlayMovie("in", 8000, 0); m_kingMoive.PlayMovie("out", 12000, 0); m_kingFront.PlayMovie("out", 12400, 0); }
internal void SendAddPhysicalTip(PhysicalObj obj) { GSPacketIn pkg = new GSPacketIn((byte)ePackageType.GAME_CMD); pkg.WriteByte((byte)eTankCmdType.ADD_TIP); pkg.WriteInt(obj.Id); pkg.WriteInt(obj.Type); pkg.WriteInt(obj.X); pkg.WriteInt(obj.Y); pkg.WriteString(obj.Model); pkg.WriteString(obj.CurrentAction); pkg.WriteInt(obj.Scale); pkg.WriteInt(obj.Rotation); SendToAll(pkg); }
public override void OnBeginNewTurn() { base.OnBeginNewTurn(); IsSay = 0; if (Game.TurnIndex > turn + 1) { if (m_kingMoive != null) { Game.RemovePhysicalObj(m_kingMoive, true); m_kingMoive = null; } if (m_kingFront != null) { Game.RemovePhysicalObj(m_kingFront, true); m_kingFront = null; } } }
public override void OnPrepareNewGame() { base.OnPrepareNewGame(); m_kingMoive = Game.Createlayer(0, 0, "moive", "game.asset.living.BossBgAsset", "out", 1, 1, 0); m_kingFront = Game.Createlayer(570, 300, "font", "game.asset.living.ClanLeaderAsset", "out", 1, 1, 0); firstBoss = Game.CreateBoss(firstbossID, 745, 410, -1, 0); firstBoss.FallFrom(745, 578, "fall", 0, 2, 1000); firstBoss.SetRelateDemagemRect(-15, -117, 26, 96); firstBoss.AddDelay(16); firstBoss.Say(LanguageMgr.GetTranslation("GameServerScript.AI.Messions.THSM3006.msg1"), 0, 3000); firstBoss.PlayMovie("", 3000, 5000); m_kingMoive.PlayMovie("in", 10000, 0); m_kingFront.PlayMovie("in", 10000, 0); m_kingMoive.PlayMovie("out", 15000, 0); m_kingFront.PlayMovie("out", 15400, 0); }
public override void OnStartGame() { base.OnStartGame(); m_kingMoive = Game.Createlayer(0, 0, "kingmoive", "game.asset.living.BossBgAsset", "out", 1, 0); m_kingFront = Game.Createlayer(610, 380, "font", "game.asset.living.boguoKingAsset", "out", 1, 0); m_king = Game.CreateBoss(m_state, 750, 668, -1, 0); m_king.FallFrom(750, 640, "fall", 0, 2, 1000); m_king.SetRelateDemagemRect(-21, -79, 72, 51); m_king.AddDelay(10); m_king.Say("你们这些低等的庶民,竟敢来到我的王国放肆!", 3000, 0); m_kingMoive.PlayMovie("in", 9000, 0); m_kingFront.PlayMovie("in", 9000, 0); m_kingMoive.PlayMovie("out", 13000, 0); m_kingFront.PlayMovie("out", 13400, 0); turn = Game.TurnIndex; }
public override void OnPrepareNewGame() { base.OnPrepareNewGame(); m_moive = Game.Createlayer(0, 0, "moive", "game.asset.living.BossBgAsset", "out", 1, 1, 0); m_front = Game.Createlayer(680, 330, "font", "game.asset.living.boguoLeaderAsset", "out", 1, 1, 0); m_boss = Game.CreateBoss(bossID, 770, -1500, -1, 1); m_boss.FallFrom(770, 301, "fall", 0, 2, 1000); m_boss.SetRelateDemagemRect(34, -35, 11, 18); m_boss.AddDelay(10); m_boss.Say(LanguageMgr.GetTranslation("GameServerScript.AI.Messions.CHM1073.msg2"), 0, 6000); m_boss.PlayMovie("call", 5900, 0); m_moive.PlayMovie("in", 9000, 0); m_boss.PlayMovie("weakness", 10000, 5000); m_front.PlayMovie("in", 9000, 0); m_moive.PlayMovie("out", 15000, 0); }
public override void OnPrepareNewGame() { base.OnPrepareNewGame(); m_kingMoive = Game.Createlayer(0, 0, "kingmoive", "game.asset.living.BossBgAsset", "out", 1, 1, 0); m_kingFront = Game.Createlayer(720, 495, "font", "game.asset.living.boguoKingAsset", "out", 1, 1, 0); m_king = Game.CreateBoss(m_state, 888, 590, -1, 0); m_king.FallFrom(888, 690, "fall", 0, 2, 1000); m_king.SetRelateDemagemRect(-21, -87, 72, 59); m_king.AddDelay(10); m_king.Say(LanguageMgr.GetTranslation("GameServerScript.AI.Messions.CHM1076.msg2"), 0, 3000); m_kingMoive.PlayMovie("in", 9000, 0); m_kingFront.PlayMovie("in", 9000, 0); m_kingMoive.PlayMovie("out", 13000, 0); m_kingFront.PlayMovie("out", 13400, 0); turn = Game.TurnIndex; }
public override void OnStartGame() { base.OnStartGame(); m_moive = Game.Createlayer(0, 0, "moive", "game.asset.living.BossBgAsset", "out", 1, 0); m_front = Game.Createlayer(680, 330, "font", "game.asset.living.boguoLeaderAsset", "out", 1, 0); m_boss = Game.CreateBoss(bossID, 770, -1500, -1, 1); m_boss.FallFrom(770, 301, "fall", 0, 2, 1000); m_boss.SetRelateDemagemRect(34, -35, 11, 18); m_boss.AddDelay(10); m_boss.Say("你们胆敢闯入我的地盘,准备受死吧!", 0, 6000); m_boss.PlayMovie("call", 5900, 0); m_moive.PlayMovie("in", 9000, 0); m_boss.PlayMovie("weakness", 10000, 5000); m_front.PlayMovie("in", 9000, 0); m_moive.PlayMovie("out", 15000, 0); //设置本关卡为Boss关卡,关卡胜利后,玩家可以翻一张牌 Game.BossCardCount = 1; }
public override void OnBeginNewTurn() { base.OnBeginNewTurn(); if (m_kingMoive != null) { Game.RemovePhysicalObj(m_kingMoive, true); m_kingMoive = null; } if (m_front != null) { Game.RemovePhysicalObj(m_front, true); m_front = null; } foreach (Player player in Game.GetAllFightPlayers()) { if (player.IsLiving == false) { player.OffSeal(player, 0); } } }
public override void OnStartGame() { base.OnStartGame(); Game.SendPassDrama(true); //再试一次跳过剧情动画 if (Game.WantTryAgain == 1 || Game.IsPassDrama) { return; } Game.SendPlayBackgroundSound(false); Game.AddAction(new LockFocusAction(false, 0, 0)); m_kingMoive = Game.Createlayer(0, 0, "kingmoive", "game.asset.living.BossBgAsset", "out", 1, 1, 0); m_front = Game.Createlayer(725, 395, "font", "game.asset.living.BombKingAsset", "out", 1, 1, 0); m_king = Game.CreateBoss(kingID, 888, 715, 1, 0); Game.AddAction(new FocusAction(m_king.X, m_king.Y - 90, 0, 0, 0)); m_king.PlayMovie("cry", 4000, 2000); m_king.Say(LanguageMgr.GetTranslation("GameServerScript.AI.Messions.CHM1377.msg2"), 2, 4000); m_king.Say(LanguageMgr.GetTranslation("GameServerScript.AI.Messions.CHM1377.msg3"), 2, 9000); m_king.MoveTo(500, m_king.Y, "walk", 13000); m_king.Say(LanguageMgr.GetTranslation("GameServerScript.AI.Messions.CHM1377.msg4"), 2, 21000); m_king.Say(LanguageMgr.GetTranslation("GameServerScript.AI.Messions.CHM1377.msg5"), 2, 25000); m_king.Say(LanguageMgr.GetTranslation("GameServerScript.AI.Messions.CHM1377.msg6"), 2, 29000); m_king.Say(LanguageMgr.GetTranslation("GameServerScript.AI.Messions.CHM1377.msg7"), 2, 33000); m_king.Say(LanguageMgr.GetTranslation("GameServerScript.AI.Messions.CHM1377.msg8"), 2, 37000); m_king.Say(LanguageMgr.GetTranslation("GameServerScript.AI.Messions.CHM1377.msg9"), 2, 41000); m_king.Say(LanguageMgr.GetTranslation("GameServerScript.AI.Messions.CHM1377.msg10"), 2, 45000); m_king.Say(LanguageMgr.GetTranslation("GameServerScript.AI.Messions.CHM1377.msg11"), 2, 49000); m_king.Say(LanguageMgr.GetTranslation("GameServerScript.AI.Messions.CHM1377.msg12"), 2, 53000, 4000); foreach (Player player in Game.GetAllFightPlayers()) { Game.SendLivingToTop(player); } }
public override bool CanGameOver() { base.CanGameOver(); //回合数到100的时候结束游戏 if (Game.TurnIndex > Game.MissionInfo.TotalTurn - 1) { return(true); } if (m_king.IsLiving == false) { if (m_state == firstBossID) { m_state++; } } if (m_state == secondBossID && m_secondKing == null) { m_kingMoive = Game.Createlayer(0, 0, "moive", "game.asset.living.BossBgAsset", "out", 1, 0); m_secondKing = Game.CreateBoss(m_state, m_king.X, m_king.Y, m_king.Direction, 1); Game.RemoveLiving(m_king.Id); if (m_secondKing.Direction == -1) { m_secondKing.SetRectBomb(24, -159, 66, 38); m_secondKing.SetRelateDemagemRect(58, -142, 5, 3); } else { m_secondKing.SetRectBomb(-90, -159, 66, 38); m_secondKing.SetRelateDemagemRect(-63, -142, 5, 3); } m_secondKing.Say("<span class='red'>你们把我激怒了,我饶不了你们!</span>", 0, 3000); m_kingMoive.PlayMovie("in", 5000, 0); m_secondKing.PlayMovie("weakness", 6100, 0); m_kingMoive.PlayMovie("out", 12000, 0); List <Player> players = Game.GetAllFightPlayers(); int minDelay = Game.FindRandomPlayer().Delay; foreach (Player player in players) { if (player.Delay < minDelay) { minDelay = player.Delay; } } m_secondKing.AddDelay(minDelay - 2000); turn = Game.TurnIndex; } if (m_secondKing != null && m_secondKing.IsLiving == false) { m_leftWall = Game.FindPhysicalObjByName("wallLeft", false); m_rightWall = Game.FindPhysicalObjByName("wallRight", false); if (m_leftWall != null) { Game.RemovePhysicalObj(m_leftWall[0], true); } if (m_rightWall != null) { Game.RemovePhysicalObj(m_rightWall[0], true); } PhysicalObj objKing = Game.CreatePhysicalObj(m_secondKing.X, m_secondKing.Y, "king", "game.living.LivingRecover005", "0", 0, 0); objKing.PlayMovie("1", 0, 2000); if (objKing.CurrentAction == "1") { m_kill++; return(true); } } return(false); }
public PhysicalObjDoAction(PhysicalObj obj, string action, int delay, int movieTime) : base(delay, movieTime) { m_obj = obj; m_action = action; }