private void OnUnitDestroy(UnitDestroyMessage message) { GameBattlePlayerInfo battlePlayer = Model.GetBattlePlayer(message.ClientId); battlePlayer.IsAlive = false; Server.SendToAllExcept(message, message.ClientId); }
private void OnDisconnected(int connectionId) { if (Model.IsUserInBattle(connectionId)) { Model.RemoveBattlePlayer(connectionId); var destroyMessage = new UnitDestroyMessage { ClientId = connectionId }; Server.SendToAllExcept(destroyMessage, connectionId); } }
private void OnOpponentDied(UnitDestroyMessage message) { (_opponnets[message.UnitId] as INetworkTank).Broke(); }
private void OnTankDied(UnitDestroyMessage message) { DropItem(GameItemCategory.Skin, Model.GetBattlePlayer(message.ClientId).Position); }