52 lines
1.3 KiB
C#
52 lines
1.3 KiB
C#
public class PCAbilityUI : PCUIMenu
|
|
{
|
|
public static PCAbilityUI Ins;
|
|
private void Awake()
|
|
{
|
|
Ins = this;
|
|
}
|
|
|
|
public PCAbilityUI_Left m_PCAbilityUI_Left;
|
|
public PCAbilityUI_Scrollview m_PCAbilityUI_Scrollview;
|
|
public PCAbilityLvUpUI m_PCAbilityLvUpUI;
|
|
public AbilityResetUI m_AbilityResetUI;
|
|
|
|
eBattleType CurType = eBattleType.Shield;
|
|
|
|
public override void Set()
|
|
{
|
|
base.Set();
|
|
NewGameUI.Ins.m_PCUI.Set_Money(table_GlobalValue.Ins.Get_Int("n_AbilityMaterialID"), 1);
|
|
m_PCAbilityUI_Left.Set(CurType);
|
|
m_PCAbilityUI_Scrollview.Set(CurType);
|
|
}
|
|
|
|
public void Set_UI()
|
|
{
|
|
m_PCAbilityUI_Scrollview.Set_UI();
|
|
}
|
|
|
|
public void Set(eBattleType battleType)
|
|
{
|
|
CurType = battleType;
|
|
Set();
|
|
}
|
|
|
|
public void OnClick_Reset()
|
|
{
|
|
m_AbilityResetUI.Set(CurType, () =>
|
|
{
|
|
var sdata = ServerInfo.Ins.m_ServerData;
|
|
if (sdata.Check_ItemAmount(1, 100))
|
|
{
|
|
ServerInfo.Ins.Save_PC_AbilityInit(CurType, () =>
|
|
{
|
|
sdata.Init_Ability(CurType);
|
|
MyValue.Get_ActorStatInfoorNull(eRole.PC);
|
|
Set_UI();
|
|
sdata.Add_MissionCount(ePurpose.HERO_ABILITY_RESET_ACC);
|
|
});
|
|
}
|
|
});
|
|
}
|
|
} |