126 lines
2.3 KiB
C#
Raw Permalink Normal View History

2025-05-18 01:04:31 +08:00
// ***********************************************************************
// Assembly : Unity
// Author : Kimch
// Created :
//
// Last Modified By : Kimch
// Last Modified On :
// ***********************************************************************
// <copyright file= "UserProxy" company=""></copyright>
// <summary></summary>
// ***********************************************************************
namespace G
{
using CodeStage.AntiCheat.ObscuredTypes;
using System.Collections.Generic;
/// <summary>
/// 用户相关
/// </summary>
public sealed class UserProxy : F.GameProxy
{
#region
/// <summary>游戏账号ID</summary>
public static string AccountID
{
get;
set;
}
/// <summary>Gets the account token.</summary>
public static string AccountToken
{
get;
set;
}
/// <summary>
///
/// </summary>
public static string UserId
{
get;
set;
}
private static ObscuredInt _BanTimestamp;
/// <summary>
/// 禁用日期
/// </summary>
public static int BanTimestamp
{
get { return _BanTimestamp; }
set { _BanTimestamp = value; }
}
#endregion
#region Field
private long _selectPlayerId = GlobalDefine.INVALID_GUID;
private readonly List<PlayerInfo> _allPlayers = new List<PlayerInfo>();
#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; }
}
/// <summary>
///
/// </summary>
public PlayerInfo selectPlayer
{
get
{
foreach (var player in _allPlayers)
{
if (player.id == _selectPlayerId)
{
return player;
}
}
return null;
}
set
{
_selectPlayerId = value.id;
}
}
/// <summary>
///
/// </summary>
public IReadOnlyList<PlayerInfo> 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
}
}