mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-01-26 18:35:34 +00:00
slight documentation
This commit is contained in:
parent
3909139ebc
commit
caffbe2100
@ -6,21 +6,29 @@ namespace QSB.Messaging
|
|||||||
{
|
{
|
||||||
public abstract class QSBMessage : QMessageBase
|
public abstract class QSBMessage : QMessageBase
|
||||||
{
|
{
|
||||||
|
/// set automatically when sending a message
|
||||||
public uint From;
|
public uint From;
|
||||||
|
/// <summary>
|
||||||
|
/// uint.MaxValue = send to everyone <br/>
|
||||||
|
/// 0 = send to host
|
||||||
|
/// </summary>
|
||||||
public uint To = uint.MaxValue;
|
public uint To = uint.MaxValue;
|
||||||
|
|
||||||
|
/// call the base method when overriding
|
||||||
public override void Serialize(QNetworkWriter writer)
|
public override void Serialize(QNetworkWriter writer)
|
||||||
{
|
{
|
||||||
writer.Write(From);
|
writer.Write(From);
|
||||||
writer.Write(To);
|
writer.Write(To);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// call the base method when overriding
|
||||||
public override void Deserialize(QNetworkReader reader)
|
public override void Deserialize(QNetworkReader reader)
|
||||||
{
|
{
|
||||||
From = reader.ReadUInt32();
|
From = reader.ReadUInt32();
|
||||||
To = reader.ReadUInt32();
|
To = reader.ReadUInt32();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// checked before calling either OnReceive
|
||||||
public virtual bool ShouldReceive => true;
|
public virtual bool ShouldReceive => true;
|
||||||
public virtual void OnReceiveRemote() { }
|
public virtual void OnReceiveRemote() { }
|
||||||
public virtual void OnReceiveLocal() { }
|
public virtual void OnReceiveLocal() { }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user