Exemplo n.º 1
0
        protected override void Awake()
        {
            base.Awake();

            _instance = this;

            _material_StepID            = Shader.PropertyToID("_Step");
            _material_BackgroundColorID = Shader.PropertyToID("_BackgroundColor");

            _blit         = gameObject.AddComponent <BasicBlit>();
            _blit.enabled = false;

            UpdateTransitionsShaders();
            UpdateTransitionsProperties();
            UpdateTransitionsColor();

            if (StartSceneOnEnterState)
            {
                _step = 1f;
                _blit.CurrentMaterial = _transitionEnterMaterial;
                _blit.CurrentMaterial.SetFloat(_material_StepID, _step);
                _blit.enabled = true;
            }
        }
        protected override void Awake()
        {
            base.Awake();

            _instance = this;

            _material_StepID = Shader.PropertyToID("_Step");
            _material_BackgroundColorID = Shader.PropertyToID("_BackgroundColor");

            _blit = gameObject.AddComponent<BasicBlit>();
            _blit.enabled = false;

            UpdateTransitionsShaders();
            UpdateTransitionsProperties();
            UpdateTransitionsColor();

            if (StartSceneOnEnterState)
            {
                _step = 1f;
                _blit.CurrentMaterial = _transitionEnterMaterial;
                _blit.CurrentMaterial.SetFloat(_material_StepID, _step);
                _blit.enabled = true;
            }
        }