public override void processMessage(NetWorker.Utilities.RawMessage message) { int minionInstanceId = message.getInt("miid"); int boardId = message.getInt("tbid"); int towerIndexOnBoard = message.getInt("tiob"); Minion minion = Engine.Game.getMinionById(minionInstanceId); DroseraTower tower = (DroseraTower)Engine.Game.getBoardById(boardId).towers[towerIndexOnBoard]; Runner.Graphics.tower_droseraTower_bite(tower, minion); }
public static void sendMessage(ICollection <Player> receiverPlayers, DroseraTower tower, Minion targetedMinion) { RawMessage msg = new RawMessage(); msg.putInt("id", TypeIdGenerator.getMessageId(typeof(GTower_DoseraTower_Bite))); if (receiverPlayers != null && receiverPlayers.Count != 0) { msg.putInt("tiob", tower.indexOnBoard); msg.putInt("tbid", tower.board.instanceId); msg.putInt("miid", targetedMinion.instanceId); foreach (var receiverPlayer in receiverPlayers) { receiverPlayer.user.session.client.SendMessage(msg); } } }
public void tower_droseraTower_bite(DroseraTower tower, Minion minion) { DroseraTowerGUI gui = tower.tag as DroseraTowerGUI; gui.biteMinion(minion); }