forked from Impostor/Impostor
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add GameHostChange event (Impostor#277)
- Loading branch information
Showing
5 changed files
with
52 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
using Impostor.Api.Net; | ||
|
||
namespace Impostor.Api.Events | ||
{ | ||
public interface IGameHostChangedEvent : IGameEvent | ||
{ | ||
IClientPlayer PreviousHost { get; } | ||
|
||
IClientPlayer? NewHost { get; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
using Impostor.Api.Events; | ||
using Impostor.Api.Games; | ||
using Impostor.Api.Net; | ||
|
||
namespace Impostor.Server.Events | ||
{ | ||
public class GameHostChangedEvent : IGameHostChangedEvent | ||
{ | ||
public GameHostChangedEvent(IGame game, IClientPlayer previousHost, IClientPlayer? newHost) | ||
{ | ||
Game = game; | ||
PreviousHost = previousHost; | ||
NewHost = newHost; | ||
} | ||
|
||
public IGame Game { get; } | ||
|
||
public IClientPlayer PreviousHost { get; } | ||
|
||
public IClientPlayer? NewHost { get; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters