コード例 #1
0
ファイル: QuestButton.cs プロジェクト: magelon/unity-assets
 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;
 }
コード例 #2
0
ファイル: QuestButton.cs プロジェクト: magelon/unity-assets
 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;
     }
 }
コード例 #3
0
 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;
     }
 }
コード例 #4
0
ファイル: QuestButton.cs プロジェクト: timsquest/SwampTown
 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();
     }
 }