using UnityEngine.Networking;
///
/// Generic Text Message for chat etc.
/// To be removed later when no longer necessary.
///
public class TextMessage : MessageBase {
///
/// Message inside the Text Message. Does not container sender information.
///
public string Message;
///
/// Create a TextMessage containing the message to be sent.
///
///
public TextMessage(string message) {
this.Message = message;
}
///
/// Parameter-less constructor using when deserializing the message.
///
public TextMessage() {
}
///
/// Used to deserialize a message received via networking.
///
///
public override void Deserialize(NetworkReader reader) {
Message = reader.ReadString();
}
///
/// Used to serialize the message before it is sent.
///
///
public override void Serialize(NetworkWriter writer) {
writer.Write(Message);
}
}