Exemplo n.º 1
0
        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();
        }
Exemplo n.º 2
0
 void SetUnlockableAtView(string unlockedItem)
 {
     if (!string.IsNullOrEmpty(unlockedItem))
     {
         var tagEventView = TagObject.GetComponent <BibaTagEventHandlerView> ();
         tagEventView.SetUnlockedSprite(unlockedItem);
     }
 }
Exemplo n.º 3
0
        void PlayIncorrectScanAnimation()
        {
            var anim = TagObject.GetComponent <Animator> ();

            if (anim != null)
            {
                anim.SetTrigger(MenuStateTrigger.No);
            }
        }
Exemplo n.º 4
0
 // 設定 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();
     }
 }