Esempio n. 1
0
    private void OnMouseDown()
    {
        ButtonHolder bh = owner.GetComponent <ButtonHolder>();

        if (bh.IsResponsive())
        {
            SpriteRenderer sr = GetComponent <SpriteRenderer>();
            sr.color = Color.gray;
        }
    }
Esempio n. 2
0
    private void OnMouseUp()
    {
        ButtonHolder bh = owner.GetComponent <ButtonHolder>();

        if (bh.IsResponsive())
        {
            SpriteRenderer sr = GetComponent <SpriteRenderer>();
            sr.color = Color.white;
            bh.ButtonPressed(myNumber);
        }
    }