Cyber/Assets/Scripts/Networking/Messages/TextMessage.cs

23 lines
428 B
C#
Raw Normal View History

using UnityEngine.Networking;
public class TextMessage : MessageBase {
2017-05-08 02:59:42 +02:00
public string Message;
public TextMessage(string message) {
2017-05-08 02:59:42 +02:00
this.Message = message;
}
public TextMessage() {
}
public override void Deserialize(NetworkReader reader) {
2017-05-08 02:59:42 +02:00
Message = reader.ReadString();
}
public override void Serialize(NetworkWriter writer) {
2017-05-08 02:59:42 +02:00
writer.Write(Message);
}
}