Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
DUMOULIN ANTOINE
Wrecking Brawl
Commits
17553d06
Commit
17553d06
authored
May 11, 2021
by
CHEEKHOOREE LUCAS
☕
Browse files
server update
parent
bbf7e4ab
Changes
2
Hide whitespace changes
Inline
Side-by-side
Server/Game/Player/DeathObserver.cs
0 → 100644
View file @
17553d06
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
));
}
}
}
}
Server/Game/Player/PlayerClient.cs
View file @
17553d06
...
...
@@ -75,6 +75,7 @@ public class PlayerClient
_observers
.
Add
(
new
HornRelay
());
_observers
.
Add
(
new
TextMessageRelay
());
_observers
.
Add
(
itemObserver
);
_observers
.
Add
(
new
DeathObserver
());
}
/**
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment