// Use this for initialization void Awake() { string binid = "MENU0004"; rl = new ReadList(binid); int a_fairy = rl.items.Length; fairy_names = new string[a_fairy]; info = new string[a_fairy]; for (int i = 0; i < a_fairy; i++) { fairy_names[i] = rl.items[i]; info[i] = rl.infos[i]; } fys = new fairy[a_fairy]; fairy_collection = new bool[a_fairy]; fairy_list = Instantiate(list_tool, transform); fairy_list.SetListPos(list_pos); fairy_list.SetInfoPos(info_pos); fairy_lv_bar = new Text[a_fairy]; fairy_lv_status = new Text[a_fairy]; for (int i = 0; i < a_fairy; i++) { fairy_lv_bar[i] = Instantiate(text, transform); fairy_lv_bar[i].name = "lv_bar_" + i.ToString(); TextSetPos(fairy_lv_bar[i], new Rect(list_pos.x + 100, list_pos.y + i * 30, list_pos.width, list_pos.height)); fairy_lv_bar[i].text = lv_bar(i); fairy_lv_status[i] = Instantiate(text, transform); fairy_lv_status[i].name = "lv_status_" + i.ToString(); TextSetPos(fairy_lv_status[i], new Rect(list_pos.x + 300, list_pos.y + i * 30, list_pos.width, list_pos.height)); fys[i] = new fairy(); } //crystals crystal_amount = Instantiate(text, transform); crystal_amount.name = "CrystalAmount"; TextSetPos(crystal_amount, crystal_pos); feed_confirm = Instantiate(diag, transform); feed_confirm.SetActive(false); //instructions instructions = Instantiate(text, transform); instructions.name = "Instructions"; instructions.GetComponent <TextSetPos>().SetPos(instructions_pos); instructions.text = "↑↓ 精灵选择 ←→ 效果A等级调整 ⓎⒶ 效果B等级调整 Ⓧ 精灵装备/卸下 Ⓑ 精灵升级"; //e for equipped e = Instantiate(picture_e, transform); FairyEquipUpdate(); }
// Use this for initialization void Start() { labels = labelname.Length; item = new string[labels][]; info = new string[labels][]; b_item = new bool[labels][]; rls = new ReadList[labels]; for (int i = 0; i < labels; i++) { int j = i + 1; binid = "MENU000" + j.ToString(); rls[i] = new ReadList(binid); item[i] = rls[i].items; info[i] = rls[i].infos; } b_item[0] = GetComponent <SystemDataManager>().LoadBools("character_collection"); b_item[1] = GetComponent <SystemDataManager>().LoadBools("setting_collection"); b_item[2] = GetComponent <SystemDataManager>().LoadBools("ending_collection"); //message lock manage for (int i = 0; i < item.Length; i++) { string[] messages = item[i]; int mes_len = messages.Length; if (b_item[i].Length != mes_len) { Debug.Log("savedata wrong."); } for (int j = 0; j < mes_len; j++) { if (!b_item[i][j]) { item[i][j] = "???"; info[i][j] = "???????"; } } } { db_list = Instantiate(listtool, transform); db_list.SetListPos(list_pos); db_list.SetInfoPos(info_pos); db_list.InitText(rls[labelpos]); } }
// Use this for initialization void Start() { PlayerPrefs.DeleteAll(); farm_menu = Instantiate(data_canvas); farm_menu.GetComponentInChildren <GameDataManager>().save_flag = false; farm_menu.SetActive(false); DataBaseMenu = Instantiate(DataBaseCanvas); DataBaseMenu.SetActive(false); //list string binid = "MENU0000"; ReadList rl = new ReadList(binid); main_menu = Instantiate(list_tool, transform); main_menu.SetListPos(list_pos); main_menu.SetInfoPos(info_pos); main_menu.GetComponent <ListTool>().InitText(rl); main_menu.SetInfoAlign(TextAnchor.MiddleCenter); }