public void MoveToRoom(int id)
        {
            if (_canvas == null)
            {
                _canvas = GameObject.Find("3DCanvas");
            }
            if (_sphereTextureManager == null)
            {
                SetupTextureManagers();
            }
            if (_orbiter == null)
            {
                _orbiter = FindObjectOfType <Orbiter>();
            }

            _orbiter.SetRotation(RoomRotationOffset[id].y, RoomCustomSettings[id].CamRotation);

            for (int i = 0; i < Rooms.Count; i++)
            {
                _canvas.transform.GetChild(i).gameObject.SetActive(i == id);
            }
            foreach (var textureManager in _sphereTextureManager)
            {
                textureManager.ChangeTexture(id);
            }

            currentId = id;
        }
        private void Awake()
        {
            SetupTextureManagers();

            _canvas = GameObject.Find("3DCanvas");

            _orbiter = FindObjectOfType <Orbiter>();
        }
Beispiel #3
0
        void Awake()
        {
            GetMaterial();

            if (Textures[_currentTexture] == null)
            {
                return;
            }

            _orbiter = FindObjectOfType <Orbiter>();
        }
Beispiel #4
0
        protected override void OnFullBlack()
        {
            if (_orbiter == null)
            {
                _orbiter = FindObjectOfType <Orbiter>();
            }

            _orbiter.Rotate();
            _material.SetFloat("_Rotation", _orbiter.GetYRotation() % 360);

            if (Textures[_currentTexture] == null)
            {
                return;
            }
            _material.SetTexture("_Tex", Textures[_currentTexture]);
        }