78 lines
1.6 KiB
C#
78 lines
1.6 KiB
C#
![]() |
// ***********************************************************************
|
|||
|
// Assembly : Game
|
|||
|
// Author : Kimch
|
|||
|
// Created : 2020-10-09
|
|||
|
// Description :
|
|||
|
// Last Modified By :
|
|||
|
// Last Modified On :
|
|||
|
// ***********************************************************************
|
|||
|
// <copyright file= "AdRewardBox" company="Kunpo"></copyright>
|
|||
|
// <summary></summary>
|
|||
|
// ***********************************************************************
|
|||
|
|
|||
|
using System.Collections.Generic;
|
|||
|
|
|||
|
namespace G.UI
|
|||
|
{
|
|||
|
using RewardData = RewardWindow.RewardData;
|
|||
|
public partial class AdRewardBox : KUIWindow
|
|||
|
{
|
|||
|
public readonly static RewardData Empty = new RewardData();
|
|||
|
|
|||
|
#region Constructor
|
|||
|
|
|||
|
public AdRewardBox()
|
|||
|
: base(UILayer.kPopup, UIMode.kNone)
|
|||
|
{
|
|||
|
uiPath = "ui_w_ad_reward";
|
|||
|
}
|
|||
|
|
|||
|
#endregion
|
|||
|
|
|||
|
#region Method
|
|||
|
|
|||
|
public static void ShowReward(Item.ItemInfo itemInfo, Callback2 callback)
|
|||
|
{
|
|||
|
Empty.Clear();
|
|||
|
Empty.items.Add(itemInfo);
|
|||
|
Empty.callback = callback;
|
|||
|
OpenWindow<AdRewardBox>(Empty);
|
|||
|
}
|
|||
|
|
|||
|
/// <summary>
|
|||
|
/// 可以处理堆叠
|
|||
|
/// </summary>
|
|||
|
/// <param name="itemInfos"></param>
|
|||
|
/// <param name="callback"></param>
|
|||
|
public static void ShowRewards(IList<Item.ItemInfo> itemInfos, Callback2 callback)
|
|||
|
{
|
|||
|
Empty.Clear();
|
|||
|
Empty.callback = callback;
|
|||
|
Item.ItemInfo.Combine(itemInfos, Empty.items);
|
|||
|
OpenWindow<AdRewardBox>(Empty);
|
|||
|
}
|
|||
|
|
|||
|
#endregion
|
|||
|
|
|||
|
#region Unity
|
|||
|
|
|||
|
/// <summary>
|
|||
|
///
|
|||
|
/// </summary>
|
|||
|
public override void Awake()
|
|||
|
{
|
|||
|
InitView();
|
|||
|
}
|
|||
|
|
|||
|
/// <summary>
|
|||
|
///
|
|||
|
/// </summary>
|
|||
|
public override void OnEnable()
|
|||
|
{
|
|||
|
RefreshView();
|
|||
|
}
|
|||
|
|
|||
|
#endregion
|
|||
|
}
|
|||
|
}
|