예제 #1
0
        // Use this for initialization
        void Start()
        {
            if (current != null && current != this)
            {
                Debug.LogWarning("There is more than one active 'RangeFadeController' scripts in the scene.\n", current.gameObject);
            }

            current = this;

            LoadID();
        }
예제 #2
0
        // Update is called once per frame
        void Update()
        {
            current = this;


            if (rangeFadeMin != rangeFadeMin_Current || rangeFadeMax_Current != rangeFadeMax)
            {
                rangeFadeMin_Current = rangeFadeMin;
                rangeFadeMax_Current = rangeFadeMax;

                Shader.SetGlobalVector(rangeFadeID, new Vector2(rangeFadeMin, rangeFadeMax));
            }
        }