public override void processMessage(RawMessage message) { Vector3 position = new Vector3(message.getFloat("x"), message.getFloat("y"), message.getFloat("z")); Minion targetMinion = Engine.Game.getMinionById(message.getInt("mid")); if (position != null && targetMinion != null) { Missile missile = (Missile)Activator.CreateInstance(TypeIdGenerator.getMissileType(message.getInt("tid")), message.getInt("iid"), position, targetMinion); Engine.Game.AddMissile(missile); Runner.Graphics.createMissile(missile); } }
public override void processMessage(RawMessage message) { float seconds = message.getFloat("s"); Engine.Game.pauseTime = seconds; Engine.Game.setState( Engine.Game.GameState.STARTCOUNTDOWN ); Runner.Graphics.displayStartCountDown(seconds); }
public override void processMessage (RawMessage message) { int tid = message.getInt("tid"); Minion minion = (Minion) System.Activator.CreateInstance( TypeIdGenerator.getMinionType( tid )); User user = Assets.Scripts.Engine.Game.getUserById(message.getInt("uid")); if (user != null) // random minionlarda null gelebilir. { minion.ownerPlayer = user.player; if (user.player == PlayerMe.self) { PlayerMe.income += minion.getIncome(); PlayerMe.cash -= minion.getCost(); Runner.Graphics.updateCashAndIncome(); } } minion.instanceId = message.getInt("iid"); 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.createMinion(minion); }
public override void processMessage(RawMessage message) { int tid = message.getInt("tid"); Minion minion = (Minion)System.Activator.CreateInstance(TypeIdGenerator.getMinionType(tid)); User user = Assets.Scripts.Engine.Game.getUserById(message.getInt("uid")); if (user != null) // random minionlarda null gelebilir. { minion.ownerPlayer = user.player; if (user.player == PlayerMe.self) { PlayerMe.income += minion.getIncome(); PlayerMe.cash -= minion.getCost(); Runner.Graphics.updateCashAndIncome(); } } minion.instanceId = message.getInt("iid"); 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.createMinion(minion); }
public override void processMessage(RawMessage message) { float seconds = message.getFloat("s"); Engine.Game.pauseTime = seconds; Engine.Game.setState(Engine.Game.GameState.STARTCOUNTDOWN); Runner.Graphics.displayStartCountDown(seconds); }
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 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 override void processMessage(RawMessage message) { float seconds = message.getFloat ("s"); Runner.Graphics.displayGReadyStateRequest(seconds); }