81 lines
1.6 KiB
C#
Raw Normal View History

2025-05-18 01:04:31 +08:00
// ***********************************************************************
// Assembly : Game
// Author : Kimch
// Created : 2021-01-08
// Description :
// Last Modified By :
// Last Modified On :
// ***********************************************************************
// <copyright file= "RedeemBox" company="Kunpo"></copyright>
// <summary></summary>
// ***********************************************************************
namespace G.UI
{
public partial class RedeemBox : KUIWindow
{
public static void Show(System.Action<string> callback)
{
OpenWindow<RedeemBox>(callback);
}
#region Constructor
public RedeemBox()
: base(UILayer.kPopup, UIMode.kNone)
{
uiPath = "ui_common/ui_w_redeem.prefab";
}
#endregion
#region Field
System.Collections.Generic.Dictionary<string, string> _redeemMapper = new System.Collections.Generic.Dictionary<string, string>(System.StringComparer.OrdinalIgnoreCase)
{
{ "shaoxia666","itcaz7na84mp" },
{ "taibai666","n2vgxfehav29" },
{ "daxia666","itcaz7na84mp" },
{ "daxia888","n2vgxfehav29" },
{ "daxia2022","n2vgxfehav29" },
{ "ohayoo2022","n2mk7iedcvas" },
};
#endregion
#region Method
private string ConvertCode(string code)
{
if (_redeemMapper.TryGetValue(code, out var result))
return result;
else
return code;
}
#endregion
#region Unity
/// <summary>
///
/// </summary>
public override void Awake()
{
InitView();
}
/// <summary>
///
/// </summary>
public override void OnEnable()
{
RefreshView();
}
#endregion
}
}