public void FinishGame(bool firstPlayerWin)
    {
        isGameBegan = false;
        isPaused    = true;

        string playerNum;

        if (!firstPlayerWin)
        {
            playerNum = "2";

            Player2Score = PlayerPrefs.GetInt("Score2");
            Player2Score++;
            PlayerPrefs.SetInt("Score2", Player2Score);
            GetHighScore(2);
        }
        else
        {
            playerNum = "1";

            Player1Score = PlayerPrefs.GetInt("Score1");
            Player1Score++;
            PlayerPrefs.SetInt("Score1", Player1Score);
            GetHighScore(1);
        }


        GameManagerLava gManager = GetComponent <GameManagerLava>();

        gManager.isPaused = true;

        // MyWinText(playerNum);
    }
    /*
     *
     * Public functions
     *
     */

    public void TakeDamage(int damage)
    {
        int current = playerHealth.curHealth;

        Debug.Log(current);
        playerHealth.AdjustCurrentHealth(-damage);
        current -= damage;

        if (current >= 30 && burnParticles.isPlaying)
        {
            // playerHealth.curHealth = current;
            burnParticles.Stop();
        }

        if (current <= 30 && !burnParticles.isPlaying)
        {
            //playerHealth.curHealth = current;
            burnParticles.Play();
        }


        if (playerHealth.curHealth == 0 && !GameManagerLava.isGamePaused())
        {
            //GameOver
            animator.SetBool("isMoving", false);
            animator.SetBool("isKilled", true);
            explodeParticles.Play();
            gameManager.FinishGame(SecondPlayer);
            soundManager.PlayDeath();
        }
        else
        {
            soundManager.PlayHurt();
        }
    }
    void FixedUpdate()
    {
        if (GameManagerLava.isGamePaused())
        {
            return;
        }

        float vertical   = Input.GetAxisRaw(vAxisName);
        float horizontal = Input.GetAxisRaw(hAxisName);
        float shoot      = Input.GetAxisRaw(attackAxisName);

        Vector2 localUp = new Vector2(transform.up.x, transform.up.y);

        if (vertical != 0)
        {
            Vector2 engineForce = Vector2.Lerp(Vector2.zero, localUp * vertical * MaximalSpeed, Velocity * Time.deltaTime);
            rb.AddForce(engineForce);
            soundManager.PlayRide();
            animator.SetBool("isMoving", true);
        }
        else
        {
            animator.SetBool("isMoving", false);
        }

        SetupParticles(vertical);

        Vector2 velocityVector = rb.velocity.normalized;
        float   dot            = Vector2.Dot(velocityVector, localUp);

        if (horizontal != 0)
        {
            if (dot < 0 && rb.velocity.magnitude > 0 && vertical < 0)
            {
                rb.MoveRotation(rb.rotation + RotationSpeed * horizontal);
            }
            else
            {
                rb.MoveRotation(rb.rotation - RotationSpeed * horizontal);
            }
        }


        if ((dot != 1) && (dot != -1) && (velocityVector.magnitude != 0))
        {
            rb.velocity = Vector2.Lerp(rb.velocity, localUp * dot * rb.velocity.magnitude, FrictionScale * Time.deltaTime);
        }

        if (shoot != 0 && timer >= ReloadSpeed)
        {
            Shoot(localUp);
        }

        timer += Time.deltaTime;
    }