2017-02-04 21:26:48 +00:00
|
|
|
|
using System;
|
2017-02-05 14:46:40 +00:00
|
|
|
|
|
|
|
|
|
using SBRL.Utilities;
|
2017-02-19 15:55:22 +00:00
|
|
|
|
using Newtonsoft.Json;
|
|
|
|
|
using SBRL.Utilities.Solutions;
|
2017-02-04 21:26:48 +00:00
|
|
|
|
|
|
|
|
|
namespace RippleSpace
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Represents a client's state at a particular point in time.
|
|
|
|
|
/// </summary>
|
|
|
|
|
public class ClientState
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// The id of the client.
|
|
|
|
|
/// </summary>
|
|
|
|
|
public int Id;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// The date and time at which this client state snapshot was captured.
|
|
|
|
|
/// </summary>
|
|
|
|
|
public DateTime TimeCaptured = DateTime.Now;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// The name the client chose to identify themselves with.
|
|
|
|
|
/// </summary>
|
|
|
|
|
public string Name;
|
|
|
|
|
|
2017-02-19 11:58:00 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// The colour associated with the client.
|
|
|
|
|
/// </summary>
|
2017-02-19 15:55:22 +00:00
|
|
|
|
[JsonConverter(typeof(ToStringJsonConverter))]
|
2017-02-19 11:58:00 +00:00
|
|
|
|
public ColourHSL Colour;
|
|
|
|
|
|
2017-02-04 21:26:48 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// The size and position of the client's viewport.
|
|
|
|
|
/// </summary>
|
2017-02-05 14:46:40 +00:00
|
|
|
|
public Rectangle Viewport = Rectangle.Zero;
|
2017-02-04 21:26:48 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// The absolute position of the client's cursor.
|
|
|
|
|
/// </summary>
|
2017-02-21 18:11:17 +00:00
|
|
|
|
public Vector2 CursorPosition = Vector2.Zero;
|
2017-02-04 21:26:48 +00:00
|
|
|
|
|
|
|
|
|
public ClientState()
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|