public void Setup(QuestEvent e, GameObject scrollList) { thisEvent = e; buttonComponent.transform.SetParent(scrollList.transform, false); eventName.text = "<b>" + thisEvent.name + "</b>\n" + thisEvent.description; status = thisEvent.status; icon.texture = waitingImage.texture; buttonComponent.interactable = false; }
public void UpadteButton(QuestEvent.EventStatus s) { status = s; if (status == QuestEvent.EventStatus.DONE) { icon.texture = doneImage.texture; buttonComponent.interactable = false; } else if (status == QuestEvent.EventStatus.WAITING) { icon.texture = waitingImage.texture; buttonComponent.interactable = false; } else if (status == QuestEvent.EventStatus.CURRENT) { icon.texture = curretImage.texture; buttonComponent.interactable = true; } }
public void UpdateButton(QuestEvent.EventStatus s) { status = s; if (status == QuestEvent.EventStatus.DONE)// if the event is completed, player can not access to the button { icon.texture = doneImage.texture; buttonComponent.interactable = false; } else if (status == QuestEvent.EventStatus.WAITING)// if the event statu is WAITING, the quest is not yet started and can not be accessed by the player { icon.texture = waitingImage.texture; buttonComponent.interactable = false; } else if (status == QuestEvent.EventStatus.CURRENT)// The quest is on prograss, and therefore it can be accessed by the player. { icon.texture = currentImage.texture; buttonComponent.interactable = true; } }
public void UpdateButton(QuestEvent.EventStatus s) { status = s; if (status == QuestEvent.EventStatus.DONE) { icon.texture = doneImage.texture; buttonComponent.interactable = false; textAnimator.SetBool("isQuestComplete", true); Invoke("SetButtonInactive", textAnimationLength); } else if (status == QuestEvent.EventStatus.WAITING) { icon.texture = waitingImage.texture; buttonComponent.interactable = false; } else if (status == QuestEvent.EventStatus.CURRENT) { icon.texture = currentImage.texture; //buttonComponent.interactable = true; buttonComponent.gameObject.SetActive(true); //ClickHandler(); } }