Example #1
0
    void Awake()
    {
        controller = FindObjectOfType<Bobbles>();
        icon = GetComponent<Image>();
        colors[0] = controller.deadColor;
        colors[1] = controller.aliveColor;
        colors[2] = controller.awakeColor;
        colors[3] = controller.overColor;

        SetState(Bobbles.bobbleState.DEAD);
    }
Example #2
0
    public void SetState(Bobbles.bobbleState newState)
    {
        currentState = newState;

        icon.color = colors[(int)currentState];
    }