Exemplo n.º 1
0
    private void EnableContainer(GameObject container)
    {
        if (container == null)
        {
            return;
        }

        if (FoundedTracker == null)
        {
            container.transform.SetParent(currentTracker);
        }
        else
        {
            container.transform.SetParent(FoundedTracker);
            Debug.Log("Enable container " + FoundedTracker);
        }

        container.transform.localPosition = Vector3.zero;
        container.transform.localRotation = Quaternion.identity;
        container.SetActive(true);

        currentActiveContainer = container;
        DianaSceneController Diana  = currentActiveContainer.GetComponent <DianaSceneController>();
        VideoController      _Video = currentActiveContainer.GetComponent <VideoController>();

        if (Diana != null)
        {
            _Diana = currentActiveContainer;
        }

        if (_Video != null)
        {
            _Video.EnableContainer();
        }
    }
Exemplo n.º 2
0
    public void RegisterContainer(Transform container)
    {
        Debug.Log("Register " + container.name);
        FoundedResults.Add(lastBundleName, container.gameObject);

        if (FoundedTracker != null && FoundedTracker != currentTracker)
        {
            container.SetParent(FoundedTracker);
            container.localPosition    = _containerTransform;
            container.localEulerAngles = _containerRotate;
        }
        else
        {
            container.SetParent(currentTracker);
            container.localPosition    = Vector3.zero;
            container.localEulerAngles = Vector3.zero;
        }

        container.localPosition = _containerTransform;
        container.localRotation = Quaternion.Euler(_containerRotate);
        currentActiveContainer  = container.gameObject;

        DianaSceneController   Diana        = currentActiveContainer.GetComponent <DianaSceneController>();
        RadomirochkaController Radomirochka = currentActiveContainer.GetComponent <RadomirochkaController>();
        VideoController        _Video       = currentActiveContainer.GetComponent <VideoController>();

        if (Diana != null)
        {
            _Diana = currentActiveContainer;
        }

        if (Radomirochka != null)
        {
            _Radomirochka = currentActiveContainer;
        }

        if (_Video)
        {
            _Video.EnableContainer();
        }
    }