IEnumerator PlayTagScanCompleteAnimation() { var anim = TagObject.GetComponent <Animator> (); if (anim == null) { TagScanCompletedSignal.Dispatch(); } else { anim.SetTrigger(MenuStateTrigger.Yes); ProcessUnlockable(); yield return(new WaitUntil(() => anim.GetCurrentAnimatorStateInfo(0).IsName(ACTIVE))); while (anim.GetCurrentAnimatorStateInfo(0).IsName(ACTIVE)) { yield return(new WaitForEndOfFrame()); } yield return(new WaitForSeconds(COMPLETE_WAITTIME)); TagScanCompletedSignal.Dispatch(); TagObject.GetComponent <BibaTagEventHandlerView> ().ARUnlock.Reset(); } DeviceAnalyticService.TrackTagScanned(); }
void SetUnlockableAtView(string unlockedItem) { if (!string.IsNullOrEmpty(unlockedItem)) { var tagEventView = TagObject.GetComponent <BibaTagEventHandlerView> (); tagEventView.SetUnlockedSprite(unlockedItem); } }
void PlayIncorrectScanAnimation() { var anim = TagObject.GetComponent <Animator> (); if (anim != null) { anim.SetTrigger(MenuStateTrigger.No); } }
// 設定 Tag 的值 public static void SetTagValue(string Tag, object Value) { GameObject[] TagObjects = GameObject.FindGameObjectsWithTag(Tag); if (TagObjects == null) { return; } if (TagObjects.Length == 0) { return; } foreach (GameObject TagObject in TagObjects) { UILabel UI = TagObject.GetComponent <UILabel> (); if (UI == null) { continue; } UI.text = Value.ToString(); } }