mirror of
https://github.com/sbrl/Nibriboard.git
synced 2018-01-10 21:33:49 +00:00
Add & hook up empty OnLinePartAddition handler to NibriClient
This commit is contained in:
parent
ecbece8f22
commit
551ceeb17e
2 changed files with 14 additions and 2 deletions
|
@ -6,7 +6,7 @@ using SBRL.Utilities;
|
|||
namespace Nibriboard.Client.Messages
|
||||
{
|
||||
/// <summary>
|
||||
/// Senyt by a client who's in the middle of drawing a line.
|
||||
/// Sent by a client who's in the middle of drawing a line.
|
||||
/// Contains a collection of points that should be added to the line they're drawing.
|
||||
/// </summary>
|
||||
public class LinePartMessage : Message
|
||||
|
|
|
@ -122,6 +122,8 @@ namespace Nibriboard.Client
|
|||
manager = inManager;
|
||||
client = inClient;
|
||||
|
||||
manager.LineIncubator.OnLinePartAddition += handleLinePartAddition;
|
||||
|
||||
client.DataReceived += async (WebSocket clientSocket, string frame) => {
|
||||
try
|
||||
{
|
||||
|
@ -446,6 +448,16 @@ namespace Nibriboard.Client
|
|||
Send(clientNotification);
|
||||
}
|
||||
|
||||
protected void handleLinePartAddition(object sender, LinePartEventArgs eventArgs)
|
||||
{
|
||||
// Ignore line part additions for ourselves and for clienst who aren't on the same plane as us
|
||||
if(eventArgs.DrawingClient.Id == Id ||
|
||||
eventArgs.DrawingClient.CurrentPlane != CurrentPlane)
|
||||
return;
|
||||
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue