Exemple #1
0
    // Update is called once per frame
    void FixedUpdate()
    {
        if (Input.GetAxisRaw("Jump") > 0)
        {
            ls.Back();
        }


        if (goingUp)
        {
            if (alpha < 100)
            {
                alpha += 0.35f;
            }
            else
            {
                goingUp = false;
            }
        }

        if (!goingUp)
        {
            if (alpha > 35)
            {
                alpha -= 0.35f;
            }
            else
            {
                goingUp = true;
            }
        }

        //Debug.Log(tmp.color);
        tmp.color = new Color(tmp.color.r, tmp.color.g, tmp.color.b, alpha / 100);
    }