// Update is called once per frame void Update() { if (CrossPlatformInputManager.GetButtonDown("left")) { pos[labelpos] = db_list.GetFocus(); //dispos[labelpos] = page.GetScroll(); labelpos--; if (labelpos == -1) { labelpos = labels - 1; } db_list.SetFocus(pos[labelpos]); db_list.InitText(rls[labelpos]); //page.SetScroll(dispos[labelpos]); } if (CrossPlatformInputManager.GetButtonDown("right")) { pos[labelpos] = db_list.GetFocus(); //dispos[labelpos] = page.GetScroll(); labelpos++; if (labelpos == labels) { labelpos = 0; } db_list.SetFocus(pos[labelpos]); db_list.InitText(rls[labelpos]); //page.SetScroll(dispos[labelpos]); } if (CrossPlatformInputManager.GetButtonDown("A")) { //page.SetBInfo(!page.GetBInfo()); if (CrossPlatformInputManager.GetButtonDown("X")) { cospos++; } } if (CrossPlatformInputManager.GetButtonDown("B")) { SceneManager.LoadScene("Title"); } }
// Update is called once per frame void Update() { int current = fairy_list.GetFocus(); if (!pause) { if (fairy_collection[current]) { if (CrossPlatformInputManager.GetButtonDown("left")) { if (lvs[current * 2] > -5) { lvs[current * 2]--; FairyLvABUpdate(current); fairy_lv_bar[current].text = lv_bar(current); } } if (CrossPlatformInputManager.GetButtonDown("right")) { if (lvs[current * 2] + lvs[current * 2 + 1] < fys[current].lv) { lvs[current * 2]++; FairyLvABUpdate(current); fairy_lv_bar[current].text = lv_bar(current); } } if (CrossPlatformInputManager.GetButtonDown("Y")) { if (lvs[current * 2] + lvs[current * 2 + 1] < fys[current].lv) { lvs[current * 2 + 1]++; FairyLvABUpdate(current); fairy_lv_bar[current].text = lv_bar(current); } } if (CrossPlatformInputManager.GetButtonDown("A")) { if (lvs[current * 2 + 1] > -5) { lvs[current * 2 + 1]--; FairyLvABUpdate(current); fairy_lv_bar[current].text = lv_bar(current); } } if (CrossPlatformInputManager.GetButtonDown("X")) { if (equip == current) { equip = -1; } else { equip = current; } FairyEquipUpdate(); } if (CrossPlatformInputManager.GetButtonDown("B")) { if (fys[current].lv < 10) { if (crystal >= fys[current].next[fys[current].lv]) { pause = true; feed_confirm.SetActive(true); } } } } } else { if (CrossPlatformInputManager.GetButtonDown("A")) { crystal -= fys[current].next[fys[current].lv]; fys[current].lv++; PlayerPrefs.SetInt("Crystal", crystal); CrystalUpdate(); FairyUpdate(current); pause = false; feed_confirm.SetActive(false); } if (CrossPlatformInputManager.GetButtonDown("B")) { pause = false; feed_confirm.SetActive(false); } } }