using UnityEngine.Networking;
namespace Cyber.Networking.Messages {
///
/// Includes information about interacting an interactible. Applicable only for some interactibles.
///
public class InteractionPkt : MessageBase {
///
/// ID of the interactible.
///
public int SyncBaseID;
///
/// Creates an InteraktionPkt, which contains the message "someone interacted".
///
///
public InteractionPkt(int syncBaseID) {
SyncBaseID = syncBaseID;
}
///
/// Empty constructor for deserialization.
///
public InteractionPkt() {}
///
/// Deserializes SyncBaseID for the recipent.
///
///
public override void Deserialize(NetworkReader reader) {
SyncBaseID = reader.ReadInt32();
}
///
/// Serializes the SyncBaseID for sending.
///
///
public override void Serialize(NetworkWriter writer) {
writer.Write(SyncBaseID);
}
}
}