Commit 17553d06 authored by CHEEKHOOREE LUCAS's avatar CHEEKHOOREE LUCAS
Browse files

server update

parent bbf7e4ab
using Communication.Messages;
using Game;
using System.Diagnostics;
namespace Game.Player
{
public class DeathObserver : IMessageObserver
{
public DeathObserver()
{}
public void HandleMessage(PlayerClient sender, AbstractMessage message)
{
if(message is DeathMessage)
{
DeathMessage m = (DeathMessage)message;
sender.server.BroadcastMessage(new DeathMessage(m.playerId));
}
}
}
}
......@@ -75,6 +75,7 @@ public class PlayerClient
_observers.Add(new HornRelay());
_observers.Add(new TextMessageRelay());
_observers.Add(itemObserver);
_observers.Add(new DeathObserver());
}
/**
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment