コード例 #1
0
 public void Action(LocationTaskDriver driver, ARWorldObject worldObject)
 {
     if (OnAction != null)
     {
         OnAction.Invoke();
     }
 }
コード例 #2
0
        public void SetFocus(LocationTaskDriver driver, ARWorldObject worldObject, bool focus)
        {
            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);
                }
                else
                {
                    if (m_guideData != null)
                    {
                        ARViewManager.Instance.ClearGuide(m_guideData);
                    }
                    ARAnnotationViewController.Instance.RemoveTapAnnotation(worldObject);
                }
            }
        }
コード例 #3
0
        public void HideTask(LocationTaskDriver driver, ARWorldObject worldObject)
        {
            if (m_guideData != null)
            {
                ARViewManager.Instance.ClearGuide(m_guideData);
            }

            ARAnnotationViewController.Instance.RemoveTapAnnotation(worldObject);
        }
コード例 #4
0
ファイル: TaskManager.cs プロジェクト: hariajie/game-of-peat
        public virtual void ActivateLocationTask(ResourceActivationContext context, LocationTask task)
        {
            IPlayerTaskDriver driver = null;

            if (CreateLocationTaskDriver != null)
            {
                driver = CreateLocationTaskDriver(context, task);
            }
            else
            {
                driver = new LocationTaskDriver(context, task);
            }

            ActivatePlayerTaskDriver(context, driver);
        }
コード例 #5
0
 protected LocationMinigameDriverBase(LocationTaskDriver taskDriver)
 {
     this.TaskDriver = taskDriver;
 }
コード例 #6
0
 public void Complete(LocationTaskDriver driver, ARWorldObject worldObject)
 {
     ARViewManager.Instance.SetTaskComplete(driver);
 }
コード例 #7
0
 public void ShowTask(LocationTaskDriver driver, ARWorldObject worldObject)
 {
 }
コード例 #8
0
 public ARCatcherMinigameDriver(LocationTaskDriver driver, ARCatcherMinigame minigame) : base(driver, minigame)
 {
 }
コード例 #9
0
 public DefaultLocationMinigameDriver(LocationTaskDriver driver) : base(driver)
 {
 }
コード例 #10
0
 protected LocationMinigameDriver(LocationTaskDriver taskDriver, T minigame)
     : base(taskDriver)
 {
     this.Minigame = minigame;
 }