Example #1
0
    void Update()
    {
        if (!gradations[current])
        {
            return;
        }

        // switch gradation texture to the next one.
        if (Input.GetKeyDown(KeyCode.LeftArrow))
        {
            current = (current-- > 0) ? current : gradations.Length - 1;
            emTransition.SetGradationTexture(gradations[current]);
        }

        // switch gradation texture to the prev one.
        if (Input.GetKeyDown(KeyCode.RightArrow))
        {
            current = (++current < gradations.Length) ? current : 0;
            emTransition.SetGradationTexture(gradations[current]);
        }
    }
Example #2
0
	void Start()
	{
		emTransition = GetComponent<EMTransition>();
		emTransition.SetGradationTexture(gradations[current]);
	}
Example #3
0
 void Start()
 {
     emTransition = GetComponent <EMTransition>();
     emTransition.SetGradationTexture(gradations[current]);
 }