// ***********************************************************************
// Assembly : Unity
// Author : Kimch
// Created :
//
// Last Modified By : Kimch
// Last Modified On :
// ***********************************************************************
//
//
// ***********************************************************************
namespace G
{
using F.Network;
public class GamePacket : IPacket
{
///
///
///
public const int ERROR_CODE_OK = 0;
///
///
///
///
///
public static bool HasError(GamePacket packet)
{
if (packet != null && packet.error == ERROR_CODE_OK)
{
return false;
}
return true;
}
///
/// 标识
///
public int id
{
get;
set;
}
///
/// 数据
///
public object data
{
get;
set;
}
///
/// 错误
///
public int error
{
get;
set;
}
///
///
///
public string token
{
get;
set;
}
public object extra
{
get;
set;
}
public Callback2 callback
{
get;
set;
}
public static GamePacket Create(int id)
{
return new GamePacket
{
id = id
};
}
}
}