Пример #1
0
    void Update()
    {
        fsm.UpdateState();

        if (dashTimer > 0)
        {
            dashTimer -= Time.deltaTime;
        }
        else if (grounded)
        {
            canDash = true;
        }

        if (hitCooldown >= 0f)
        {
            mesh.material = cooldown;
            hitCooldown  -= Time.deltaTime;
        }
        else
        {
            mesh.material = normal;
        }
    }