37 lines
978 B
C#
37 lines
978 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
public class WitchMiniInfo : MonoBehaviour
|
|
{
|
|
public UISprite sprite_face;
|
|
public UILabel[] labels; // 0 이름, 1 레벨
|
|
public UISlider slider_lv;
|
|
|
|
string nickname;
|
|
|
|
private void Awake() { NickChange.actChangeNick.Add(Set_Name); }
|
|
|
|
public void Set(string nick, ServerData sdata)
|
|
{
|
|
sprite_face.spriteName = table_itemlist.Ins.Get_Data(sdata.Get_EqiupmentEquip(eItem.PC)).s_ItemIcon;
|
|
|
|
nickname = nick;
|
|
Set_Name(nick);
|
|
labels[1].text = DSUtil.Format("Lv {0}", sdata.PC.Lv);
|
|
|
|
slider_lv.value = sdata.PC.Get_ExpSliderValue();
|
|
}
|
|
|
|
void Set_Name(string nick)
|
|
{
|
|
if (nick.Length > 7)
|
|
labels[0].text = DSUtil.Format("{0}{1}{2}{3}{4}{5}{6}..", nick[0], nick[1], nick[2], nick[3], nick[4], nick[5], nick[6]);
|
|
else
|
|
labels[0].text = nick;
|
|
}
|
|
|
|
public void OnClick_Detail()
|
|
{
|
|
}
|
|
} |