2025-05-18 01:04:31 +08:00

86 lines
1.5 KiB
C#

// ***********************************************************************
// Assembly : Game
// Author : Kimch
// Created : 2021-05-26
// Description :
// Last Modified By :
// Last Modified On :
// ***********************************************************************
// <copyright file= "RateBox" company="Kunpo"></copyright>
// <summary></summary>
// ***********************************************************************
using UnityEngine;
namespace G.UI
{
public partial class RateBox : KUIWindow
{
#region Constructor
public RateBox()
: base(UILayer.kPopup, UIMode.kNone)
{
uiPath = "ui_w_rate";
}
#endregion
#region Method
public static void AppRatingByLevel(int levelId)
{
if (levelId >= 4 && !KRemoteConfig.Instance.isReview)
{
int rate = PlayerPrefs.GetInt("rate", 0);
if (rate == 0 && (levelId == 4 || levelId == 9))
{
OpenWindow<RateBox>();
}
else if (rate == 2 && ((levelId % 12) == 0))//下一次
{
OpenWindow<RateBox>();
}
}
}
#endregion
#region Unity
/// <summary>
///
/// </summary>
public override void Awake()
{
InitView();
}
/// <summary>
///
/// </summary>
public override void OnEnable()
{
RefreshView();
}
/// <summary>
///
/// </summary>
public override void Update()
{
UpdateView();
}
/// <summary>
///
/// </summary>
public override void UpdatePerSecond()
{
}
#endregion
}
}