Exemple #1
0
        // TODO: everything below here is a bit of a grab-bag that needs a refactor.
        // Essentially, task driver delegates should handle the todo list in some way.
        // For now, we know what we want each one to do so we'll do it directly.
        void SetTodoTask(IPlayerTaskDriver driver)
        {
            // Don't preview complete/closed tasks
            if (driver != null && (driver.IsComplete || driver.ActivationContext.IsClosed))
            {
                m_todoIsOverride = false;
                m_currTodoDriver = null;

                driver.SetFocus(false);

                return;
            }

            if (m_currTodoDriver != null && m_currTodoDriver != driver)
            {
                m_currTodoDriver.SetFocus(false);
            }

            m_currTodoDriver = driver;

            if (m_currTodoDriver != null)
            {
                m_currTodoDriver.SetFocus(true);
            }
        }
Exemple #2
0
        // TODO: everything below here is a bit of a grab-bag that needs a refactor.
        // Essentially, task driver delegates should handle the todo list in some way.
        // For now, we know what we want each one to do so we'll do it directly.
        void SetTodoTask(IPlayerTaskDriver driver)
        {
            // Don't preview complete/closed tasks
            if (driver != null && (driver.IsComplete || driver.ActivationContext.IsClosed))
            {
                m_currTodoDriver = null;

                driver.SetFocus(false);

                SetToDoPanel(null);

                return;
            }

            if (m_currTodoDriver != null && m_currTodoDriver != driver)
            {
                m_currTodoDriver.SetFocus(false);
            }

            m_currTodoDriver = driver;

            if (driver != null)
            {
                if (driver is LocationTaskDriver && LocationTaskAnnotationHandler.Instance)
                {
                    var ann = LocationTaskAnnotationHandler.Instance.GetNearestAnnotation((LocationTaskDriver)driver);

                    if (ann != null)
                    {
                        MapController.Instance.FocusAnnotation(ann);
                    }
                    else
                    {
                        SetToDoPanel(LocationTaskAnnotationHandler.Instance.SelectedLocationPanel, driver);
                    }
                }
                else if (driver is ARTaskDriver && ARTaskAnnotationHandler.Instance)
                {
                    var ann = ARTaskAnnotationHandler.Instance.GetNearestAnnotation((ARTaskDriver)driver);

                    if (ann != null)
                    {
                        MapController.Instance.FocusAnnotation(ann);
                    }
                    else
                    {
                        SetToDoPanel(ARTaskAnnotationHandler.Instance.SelectedLocationPanel, driver);
                    }
                }
#if MOTIVE_VUFORIA
                else if (driver is VisualMarkerTaskDriver)
                {
                    SetToDoPanel(VisualMarkerTaskPanel, driver);
                }
#endif
                else if (driver.Task.Type == "motive.gaming.characterTask")
                {
                    SetToDoPanel(CharacterTaskPanel, driver);
                }
                else
                {
                    SetToDoPanel(SimpleTaskPanel, driver);
                }

                driver.SetFocus(true);
            }
            else
            {
                SetToDoPanel(null);
            }
        }