Example #1
0
    private void Update()
    {
        if (Input.GetAxisRaw(voteAxis) > 0)
        {
            upInUse = true;
            if (downInUse == false)
            {
                myAnim.SetBool("Hate", true);
                myAnim.SetBool("Cheer", false);

                downInUse = true;
                speechManager.Hate();
                idleTimer = startIdleTimer;
            }
        }
        else if (Input.GetAxisRaw(voteAxis) < 0)
        {
            downInUse = false;
            if (upInUse == false)
            {
                myAnim.SetBool("Cheer", true);
                myAnim.SetBool("Hate", false);
                upInUse = true;
                speechManager.Cheer();
                idleTimer = startIdleTimer;
            }
        }
        else
        {
            upInUse    = false;
            downInUse  = false;
            idleTimer -= Time.deltaTime;
            if (idleTimer < 0)
            {
                myAnim.SetBool("Cheer", false);
                myAnim.SetBool("Hate", false);
                idleTimer = startIdleTimer;
            }
        }
    }