Example #1
0
        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);
     }
 }
Example #3
0
 private void OnOpponentDied(UnitDestroyMessage message)
 {
     (_opponnets[message.UnitId] as INetworkTank).Broke();
 }
Example #4
0
 private void OnTankDied(UnitDestroyMessage message)
 {
     DropItem(GameItemCategory.Skin, Model.GetBattlePlayer(message.ClientId).Position);
 }