41 lines
1.0 KiB
C#
41 lines
1.0 KiB
C#
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
|
|
public class GachaUI : uScrollViewMgr
|
|
{
|
|
public GameObject[] gos_grade;
|
|
public Slider slider_lucky;
|
|
|
|
List<(eMoney, int)> list_log = new List<(eMoney, int)>();
|
|
|
|
public void Set()
|
|
{
|
|
gameObject.SetActive(true);
|
|
DSUtil.InActivateGameObjects(gos_grade);
|
|
Set_UI();
|
|
}
|
|
|
|
void Set_UI()
|
|
{
|
|
slider_lucky.value = SaveMgr.Ins.Get_Money(eMoney.Lucky) / table_GlobalValue.Ins.Get_Float("LuckyPoint");
|
|
}
|
|
|
|
public void OnClick_Lucky()
|
|
{
|
|
|
|
}
|
|
|
|
public void OnClick_Gacha()
|
|
{
|
|
var gradedata = table_gacharateconfig.Ins.Get_RadomData();
|
|
DSUtil.InActivateGameObjects(gos_grade, gradedata.n_GachaGrade - 1);
|
|
var reward = table_gachareward.Ins.Get_Reward(gradedata.n_GachaGrade);
|
|
SaveMgr.Ins.Add_Money(reward.Item1, reward.Item2);
|
|
SaveMgr.Ins.Save();
|
|
list_log.Add(reward);
|
|
Set_ScrollView(list_log);
|
|
Set_Vertical_ScrollEnd(0);
|
|
Set_UI();
|
|
}
|
|
} |