Exemple #1
0
 public void Action(ARCatcherMinigameDriver driver, ARWorldObject worldObject)
 {
     if (OnAction != null)
     {
         OnAction.Invoke();
     }
 }
Exemple #2
0
        public void SetFocus(ARCatcherMinigameDriver minigameDriver, ARWorldObject worldObject, bool focus)
        {
            var driver = minigameDriver.TaskDriver;

            if (worldObject != null)
            {
                var task = driver.Task;

                if (focus)
                {
                    m_guideData = new ARGuideData
                    {
                        Instructions = task.Title,
                        Range        = task.ActionRange,
                        WorldObject  = worldObject
                    };

                    ARViewManager.Instance.SetGuide(m_guideData);

                    var text = driver.IsTakeTask ?
                               Localize.GetLocalizedString("ARAnnotation.TapToTake", "Tap to Collect") :
                               (driver.IsGiveTask ? Localize.GetLocalizedString("ARAnnotation.TapToPut", "Tap to Put") : null);

                    ARAnnotationViewController.Instance.AddTapAnnotation(worldObject, text, minigameDriver.Complete);
                }
                else
                {
                    if (m_guideData != null)
                    {
                        ARViewManager.Instance.ClearGuide(m_guideData);
                    }
                    ARAnnotationViewController.Instance.RemoveTapAnnotation(worldObject);
                }
            }
        }
Exemple #3
0
        public void HideTask(ARCatcherMinigameDriver minigameDriver, ARWorldObject worldObject)
        {
            if (m_guideData != null)
            {
                ARViewManager.Instance.ClearGuide(m_guideData);
            }

            ARAnnotationViewController.Instance.RemoveTapAnnotation(worldObject);
        }
Exemple #4
0
 public void Complete(ARCatcherMinigameDriver driver, ARWorldObject worldObject)
 {
     ARViewManager.Instance.SetTaskComplete(driver.TaskDriver);
 }