Esempio n. 1
0
    // Use this for initialization
    void Start()
    {
        charged = false;
        color = GameColor.FromName(colorName);
        gem.renderer.material.color = color.DullColor();

        lines = new LineBehaviour[monuments.Length];
    }
Esempio n. 2
0
    private IEnumerator SwitchColorRoutine(GameColor color)
    {
        Color startColor = renderer.material.color;

        for (float timer = 0f; timer < 2f; timer += Time.deltaTime) {
            SetRendererColors(Color.Lerp(startColor, color.DullColor(), timer / 1f));
            yield return null;
        }

        SetRendererColors(color.DullColor());
    }