Example #1
0
    // Update is called once per frame
    void FixedUpdate()
    {
        switch (buttonState)
        {
        case (ButtonState.PRESSING):
            Debug.Log(string.Format("{0} is pressed", gameObject.name));
            animationScript.pressAnimation(gameObject);
            break;

        case (ButtonState.RELEASING):
            Debug.Log(string.Format("{0} released", gameObject.name));
            animationScript.releaseAnimation(gameObject);
            break;

        default:
            break;
        }
    }