Files
taptap2024_GJ_chidouren/Assets/Scripts/Views/AboutPanel.cs

46 lines
1.5 KiB
C#
Raw Normal View History

2024-10-16 00:03:41 +08:00
using System.Collections.Generic;
using Framework.Asset;
using UnityEngine;
using UnityEngine.UI;
using IcecreamView;
using TMPro;
namespace Views
{
public class AboutPanel : IcecreamView.IC_AbstractModule
{
[SerializeField] private TMP_Text _clientVersion;
[SerializeField] private Button _closeBtn;
[SerializeField] private Button _toStoreBtn;
[SerializeField] private Button _toOfficialBtn;
public override void OnInitView()
{
_closeBtn.onClick.AddListener(ViewConnector.CloseView, SeAudio.Btn_Close);
_toStoreBtn.onClick.AddListener(OnClickToStore, SeAudio.Btn_Click);
_toOfficialBtn.onClick.AddListener(OnClickToOfficial, SeAudio.Btn_Click);
}
private void OnClickToOfficial()
{
2024-10-28 17:19:45 +08:00
LaunchAppUtils.ToTapTapTargetApp(GameGlobalConfig.Instance.TapAppUrl);
2024-10-16 00:03:41 +08:00
}
private void OnClickToStore()
{
LaunchAppUtils.ToTapTapTargetApp("https://l.taptap.cn/z9TVixXn?channel=rep-rep_f71jmhes1q8");
}
public override void OnOpenView(IC_ViewData parameters)
{
var assetVersion = AssetManager.GetCurVersion();
this._clientVersion.text
= string.Format(this._clientVersion.text,
Application.version + $".[{assetVersion}.{(int)GameGlobalConfig.Instance.Channel}]");
}
public override void OnCloseView()
{
}
}
}