// ***********************************************************************
// Assembly : Unity
// Author : Kimch
// Created :
//
// Last Modified By : Kimch
// Last Modified On :
// ***********************************************************************
//
//
// ***********************************************************************
namespace G
{
using CodeStage.AntiCheat.ObscuredTypes;
using System.Collections.Generic;
///
/// 用户相关
///
public sealed class UserProxy : F.GameProxy
{
#region 平台相关
/// 游戏账号ID
public static string AccountID
{
get;
set;
}
/// Gets the account token.
public static string AccountToken
{
get;
set;
}
///
///
///
public static string UserId
{
get;
set;
}
private static ObscuredInt _BanTimestamp;
///
/// 禁用日期
///
public static int BanTimestamp
{
get { return _BanTimestamp; }
set { _BanTimestamp = value; }
}
#endregion
#region Field
private long _selectPlayerId = GlobalDefine.INVALID_GUID;
private readonly List _allPlayers = new List();
#endregion
#region Property
private static UserProxy _Instance;
public static UserProxy Instance { get { return _Instance; } }
private void Awake()
{
_Instance = this;
}
public int selectJobId;
public string selectNickName;
public long selectPlayerId
{
get { return _selectPlayerId; }
}
///
///
///
public PlayerInfo selectPlayer
{
get
{
foreach (var player in _allPlayers)
{
if (player.id == _selectPlayerId)
{
return player;
}
}
return null;
}
set
{
_selectPlayerId = value.id;
}
}
///
///
///
public IReadOnlyList allPlayers
{
get { return _allPlayers.AsReadOnly(); }
}
#endregion
#region 角色
public override void Init()
{
//GameFacade.Instance.RegisterResp(msg.S2CAccountLogin.MessageType, this);
//GameFacade.Instance.RegisterResp(msg.S2CLoginPlayers.MessageType, this);
}
#endregion
}
}