48 lines
1.3 KiB
C#
48 lines
1.3 KiB
C#
|
|
using System;
|
|||
|
|
using GUPS.AntiCheat.Protected;
|
|||
|
|
using TMPro;
|
|||
|
|
using UnityEngine;
|
|||
|
|
|
|||
|
|
public class MiniGameResult : MonoBehaviour
|
|||
|
|
{
|
|||
|
|
public TextMeshProUGUI[] texts; // 0 <20>ִ<EFBFBD> <20><EFBFBD>, 1 <20><EFBFBD> <20><><EFBFBD>ʽ<EFBFBD>, 2 ȹ<><C8B9> ä<><C3A4> <20><><EFBFBD><EFBFBD>, 3 ȹ<><C8B9> <20><>í <20><><EFBFBD><EFBFBD>, 4 <20>߰<EFBFBD> ȹ<>淮
|
|||
|
|
|
|||
|
|
ProtectedInt32 m_coinAmount, m_rubyAmount;
|
|||
|
|
Action act_off;
|
|||
|
|
|
|||
|
|
public void Set(long coinAmount, int bonuscoin, int rubyAmount, int maxCombo, int maxFeverStreak,
|
|||
|
|
int missionSuccessPhotoID, Action _off)
|
|||
|
|
{
|
|||
|
|
gameObject.SetActive(true);
|
|||
|
|
act_off = _off;
|
|||
|
|
|
|||
|
|
m_coinAmount = (int)coinAmount;
|
|||
|
|
m_coinAmount.Obfuscate();
|
|||
|
|
m_rubyAmount = rubyAmount;
|
|||
|
|
m_rubyAmount.Obfuscate();
|
|||
|
|
|
|||
|
|
texts[0].text = maxCombo.ToString();
|
|||
|
|
texts[1].text = ((int)(maxCombo / 10f)).ToString() + "%";
|
|||
|
|
texts[2].text = rubyAmount.ToString();
|
|||
|
|
texts[3].text = coinAmount.ToString();
|
|||
|
|
texts[4].text = $"+{bonuscoin}";
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
public void OnClick_AD()
|
|||
|
|
{
|
|||
|
|
ADInfo.Ins.Show_AD(false, () =>
|
|||
|
|
{
|
|||
|
|
SaveMgr.Ins.Add_Money(eMoney.Gacha, m_coinAmount);
|
|||
|
|
SaveMgr.Ins.Add_Money(eMoney.Chat, m_rubyAmount);
|
|||
|
|
SaveMgr.Ins.Save();
|
|||
|
|
|
|||
|
|
gameObject.SetActive(false);
|
|||
|
|
act_off();
|
|||
|
|
});
|
|||
|
|
}
|
|||
|
|
public void OnClick_Close()
|
|||
|
|
{
|
|||
|
|
gameObject.SetActive(false);
|
|||
|
|
act_off();
|
|||
|
|
}
|
|||
|
|
}
|