//Organelde ara public string SearchOrganelForInfo(string organelTag, int infoIndex) { string wasFoundInfo = ""; foreach (var item in organelManager.Organeller) { if (item.Etiket == organelTag) { FindedOrganel = item; //YaziPanel.SetActive(true); Animator animator = YaziPanel.GetComponent <Animator>(); if (animator != null) { animator.SetBool("isOpen", true); blobSoundEffect.Play(); if (item.OrganelBilgi.Count > 1) { İleriButton.SetActive(true); GeriButton.SetActive(false); } if (item.OrganelBilgi.Count == 1) { İleriButton.SetActive(false); GeriButton.SetActive(false); } isActive = true; } wasFoundInfo = item.OrganelBilgi[infoIndex]; //Burada İndeksler Arasında Gezerek Bütün Bilgileri Göstereceğim. //if(OrganelBilgiIndex >=0 && OrganelBilgiIndex < OrganelListLength - 1) //{ // wasFoundInfo = item.OrganelBilgi[infoIndex]; //} OrganelListLength = item.OrganelBilgi.Count; item.SetOutline(outline); //Aranan organel bulunduğunda outline shader uygular. break; } else { if (item.isOutline) { item.RemoveOutline(); } } } return(wasFoundInfo); }
public void ForwardInfo() { Organel organel = TouchController.GetFindedOrganel(); if (index < organel.OrganelBilgi.Count - 1) { index++; TouchController.InfoText.text = organel.OrganelBilgi[index]; } else { İleriButton.SetActive(false); GeriButton.SetActive(true); } }
public void BackInfo() { Organel organel = TouchController.GetFindedOrganel(); if (index > 0) { //Debug.LogError("BİLGİ SONUCU => " + organel.OrganelBilgi[index--]); index--; TouchController.InfoText.text = organel.OrganelBilgi[index]; } else { GeriButton.SetActive(false); İleriButton.SetActive(true); } }