Esempio n. 1
0
    private void Jump()
    {
        LeanTween.rotate(PlayerMesh, new Vector3(-90, PlayerMesh.transform.rotation.eulerAngles.y + 180, 0), .5f);
        runState = runState == RunState.RunLeftWall ? RunState.RunRightWall : RunState.RunLeftWall;
        int dir = runState == RunState.RunLeftWall ? 1 : -1;

        //playerRb.isKinematic = false;
        playerRb.velocity = new Vector2(jumpSoeed * dir, 0);
        isJumpping        = true;
        cameraRotation.SwitchCameras();
    }