Shegotwet/Assets/Scripts/UI/LobbyCenterProfileUI.cs

34 lines
788 B
C#

using UnityEngine;
public class LobbyCenterProfileUI : MonoBehaviour
{
// 카드는 3개만 있으면 됨
// 움직이는 연출 후 UI 갱신하면 될 듯
public ProfileCard[] arr_profileCard;
int curGirl = 0;
public void Set()
{
if (curGirl == 0) curGirl = SaveMgr.Ins.Get_SelectGirlID();
var pre_girl = curGirl - 1;
if (pre_girl <= 0) pre_girl = 8;
arr_profileCard[0].Set(pre_girl);
arr_profileCard[1].Set(curGirl);
var next_girl = curGirl + 1;
if (next_girl > 8) next_girl = 1;
arr_profileCard[2].Set(next_girl);
}
public void OnClick_Arrow(int add)
{
curGirl += add;
if (curGirl <= 0) curGirl = 8;
if (curGirl > 8) curGirl = 1;
Set();
}
}