59 lines
2.0 KiB
C#
59 lines
2.0 KiB
C#
|
|
using System.Collections;
|
||
|
|
using System.Collections.Generic;
|
||
|
|
using UnityEngine;
|
||
|
|
|
||
|
|
public class MemoryWitchResult : BackKeyAdd
|
||
|
|
{
|
||
|
|
public UILabel[] labels; // 0 현재 등급, 1 현재 효과 공격력, 2 현재 효과 체력, 3 4 5 상자 개수
|
||
|
|
public UISprite[] sprites; // 0 확인 버튼
|
||
|
|
public GameObject[] gos; // 0 1 등급 상승
|
||
|
|
|
||
|
|
List<int> list_clearID = new List<int>();
|
||
|
|
int HighID;
|
||
|
|
|
||
|
|
public void Init() { list_clearID.Clear(); HighID = 0; Check(); }
|
||
|
|
|
||
|
|
public override void Set()
|
||
|
|
{
|
||
|
|
base.Set();
|
||
|
|
|
||
|
|
sprites[0].spriteName = MyValue.OffButtonName;
|
||
|
|
|
||
|
|
var sdata = ServerInfo.Ins.m_ServerData;
|
||
|
|
var beforeStep = sdata.Get_Memory_Step(eMemory.a4_WitchGrade);
|
||
|
|
gos[0].SetActive(beforeStep < HighID);
|
||
|
|
gos[1].SetActive(beforeStep < HighID);
|
||
|
|
sdata.Set_Memory_WitchGrade(HighID);
|
||
|
|
var wTdata = table_memorywitch.Ins.Get_Data(sdata.Get_Memory_Step(eMemory.a4_WitchGrade));
|
||
|
|
var tTdata = table_title.Ins.Get_Data(wTdata.TitleID);
|
||
|
|
labels[0].text = tTdata.Name;
|
||
|
|
labels[1].text = DSUtil.GetThousandCommaText(wTdata.Attack * 100f, true);
|
||
|
|
labels[2].text = DSUtil.GetThousandCommaText(wTdata.HP * 100f, true);
|
||
|
|
|
||
|
|
InGameInfo.Ins.SaveItems();
|
||
|
|
sdata.Use_Item(eItem.MemoryWitchGrade);
|
||
|
|
sdata.Add_MissionCount(MyValue.arr_Mission[1], 34);
|
||
|
|
for (int i = 0; i < list_clearID.Count; i++)
|
||
|
|
sdata.Add_Item(new ItemData(eItem.Title, table_memorywitch.Ins.Get_Data(list_clearID[i]).TitleID, 1));
|
||
|
|
ServerInfo.Ins.Write(() =>
|
||
|
|
{
|
||
|
|
sprites[0].spriteName = "button7";
|
||
|
|
});
|
||
|
|
}
|
||
|
|
|
||
|
|
public override void OnClick_Back()
|
||
|
|
{
|
||
|
|
if (sprites[0].spriteName == "button7")
|
||
|
|
{
|
||
|
|
base.OnClick_Back();
|
||
|
|
InGameInfo.Ins.Return_To_Lobby();
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
public void Add_ClearID(int _id)
|
||
|
|
{
|
||
|
|
if (HighID < _id) HighID = _id;
|
||
|
|
list_clearID.Add(_id);
|
||
|
|
}
|
||
|
|
public List<int> Get_ClearID() { return list_clearID; }
|
||
|
|
}
|