コード例 #1
0
ファイル: OrbScript.cs プロジェクト: jake-white/BubbleTake
    void Update()
    {
        float timeLeft = (timeUntilDeath - (Time.time - timeCreated)) / timeUntilDeath;
        Color newColor = new Color(oldColor.r, oldColor.g, oldColor.b, oldColor.a * timeLeft);

        rend.material.SetColor("_Color", newColor);
        if (Time.time > timeCreated + timeUntilDeath)
        {
            manager.deathOrb(this);
        }
    }