Example #1
0
    void Update()
    {
        var elapsed    = Time.time - StartTime;
        var elapsedPct = elapsed / Ground.Map.RuneTimeUntilDangerous;

        Ground.RuneGlowRenderer.color = new Color(1f, 1f, 1f, elapsedPct);

        // Destroy this script.
        if ((elapsedPct) > 1f)
        {
            Ground.DangerifyRune();
            Destroy(this);
        }
    }