using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using UnityEngine.Networking;
|
|
|
|
public class LoginProtocols
|
|
{
|
|
public const short RequestLoginDetails = 100;
|
|
public const short SendingLoginDetails = 101;
|
|
public const short LoginSuccess = 102;
|
|
public const short LoginFail = 103;
|
|
|
|
public class EmptyMsg : MessageBase { }
|
|
|
|
public class LoginMsg : MessageBase
|
|
{
|
|
public string Name;
|
|
public Color Color;
|
|
|
|
public LoginMsg() { }
|
|
|
|
public LoginMsg (string Name, Color Color)
|
|
{
|
|
this.Name = Name;
|
|
this.Color = Color;
|
|
}
|
|
|
|
public override void Serialize(NetworkWriter writer)
|
|
{
|
|
base.Serialize(writer);
|
|
writer.Write(Name);
|
|
writer.Write(Color);
|
|
}
|
|
|
|
public override void Deserialize(NetworkReader reader)
|
|
{
|
|
base.Deserialize(reader);
|
|
Name = reader.ReadString();
|
|
Color = reader.ReadColor();
|
|
}
|
|
}
|
|
}
|
|
|
|
|