public override void processMessage(RawMessage message) { FrankenScientistMinion parentMinion = (FrankenScientistMinion)Engine.Game.getMinionById(message.getInt("iid")); int stackCount = message.getInt("c"); Runner.Graphics.minion_frankenScientist_stackChanged(parentMinion, stackCount); }
public static void sendMessage(ICollection <Player> receiverPlayers, FrankenScientistMinion parentMinion, ScrapGolemMinion spawnedMinion) { RawMessage msg = new RawMessage(); msg.putInt("id", TypeIdGenerator.getMessageId(typeof(GMinion_FrankenScientist_spawn))); if (receiverPlayers != null && receiverPlayers.Count != 0) { msg.putInt("iid", parentMinion.instanceId); if (spawnedMinion.ownerPlayer != null) { msg.putInt("uid", spawnedMinion.ownerPlayer.id); } else { msg.putInt("uid", -1); } msg.putInt("sid", spawnedMinion.instanceId); msg.putInt("bid", spawnedMinion.position.board.instanceId); msg.putInt("cid", spawnedMinion.position.pathPosition.pointIndex); msg.putFloat("t", spawnedMinion.position.pathPosition.ratio); foreach (var receiverPlayer in receiverPlayers) { receiverPlayer.user.session.client.SendMessage(msg); } } }
public void minion_frankenScientist_stackChanged(FrankenScientistMinion minion, int stackCount) { if (minion.tag != null) { FrankenScientistMinionGUI gui = minion.tag as FrankenScientistMinionGUI; if (gui != null) { gui.updateStackCount(stackCount); } } }
public static void sendMessage(ICollection <Player> receiverPlayers, FrankenScientistMinion minion, int stackCount) { RawMessage msg = new RawMessage(); msg.putInt("id", TypeIdGenerator.getMessageId(typeof(GMinion_FrankenScientist_stackChanged))); if (receiverPlayers != null && receiverPlayers.Count != 0) { msg.putInt("iid", minion.instanceId); msg.putInt("c", stackCount); foreach (var receiverPlayer in receiverPlayers) { receiverPlayer.user.session.client.SendMessage(msg); } } }
public override void processMessage(RawMessage message) { FrankenScientistMinion parentMinion = (FrankenScientistMinion)Engine.Game.getMinionById(message.getInt("iid")); ScrapGolemMinion minion = parentMinion.createScrapGolem(); User user = Assets.Scripts.Engine.Game.getUserById(message.getInt("uid")); if (user != null) // random minionlarda null gelebilir. { minion.ownerPlayer = user.player; } minion.instanceId = message.getInt("sid"); minion.position = new MinionPosition(); minion.position.pathPosition = new PathPosition(0, 0); minion.position.board = Assets.Scripts.Engine.Game.getBoardById(message.getInt("bid")); minion.position.pathPosition.pointIndex = message.getInt("cid"); minion.position.pathPosition.ratio = message.getFloat("t"); minion.position.board.AddMinion(minion); Runner.Graphics.minion_frankenScientist_spawn(parentMinion, minion); }
public void minion_frankenScientist_spawn(FrankenScientistMinion parentMinion, ScrapGolemMinion spawnedMinion) { createMinion(spawnedMinion); }