Project_WL/Assets/Script/UI/PC/Ability/PCAbilityUI_Left.cs

30 lines
930 B
C#

using System.Collections;
using System.Collections.Generic;
using TMPro;
using UnityEngine;
using UnityEngine.UI;
public class PCAbilityUI_Left : uScrollViewMgr
{
public TextMeshProUGUI[] texts; // 0 무기 타입, 1 획득한 특성 갯수
public Slider slider_amount;
List<eBattleType> list = new List<eBattleType>
{ eBattleType.Shield, eBattleType.OneHand, eBattleType.Bow, eBattleType.Staff, eBattleType.TwoHand, eBattleType.DualWeapon };
private void Start()
{
Set_ScrollView(list);
}
public void Set(eBattleType battleType)
{
var sdata = ServerInfo.Ins.m_ServerData;
texts[0].text = battleType.ToString();
var lst = table_abilityconfig.Ins.Get_DataList(battleType);
var count = sdata.Get_ObtainAbility(lst);
texts[1].text = $"{count}/{lst.Count}";
slider_amount.value = DSUtil.Get_SliderValue((float)count / lst.Count);
}
}