Fliping character 180 degrees when moving left

So I am using the PlayerPlatformerController that Unity provides and the script flips the Character. I dont want that because I used skeletal animation and if I flip every single sprite it doesn’t look right, so instead i want to rotate my character by 180 degrees but i dont know how to do that via this script.

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class PlayerPlatformerController : PhysicsObject
{

    public float maxSpeed = 7;
    public float jumpTakeOffSpeed = 7;

    private SpriteRenderer[] spriteRenderer;
    private Animator animator;

    // Use this for initialization
    void Awake()
    {
        spriteRenderer = GetComponentsInChildren<SpriteRenderer>();
        animator = GetComponent<Animator>();
    }

    protected override void ComputeVelocity()
    {
        Vector2 move = Vector2.zero;

        move.x = Input.GetAxis("Horizontal");

        if (Input.GetButtonDown("Jump") && grounded)
        {
            velocity.y = jumpTakeOffSpeed;
        }
        else if (Input.GetButtonUp("Jump"))
        {
            if (velocity.y > 0)
            {
                velocity.y = velocity.y * 0.5f;
            }
        }

        bool flipSprite = (spriteRenderer[0].flipX ? (move.x > 0.01f) : (move.x < 0.01f));
        if (flipSprite)
        {
            for (int i = 0; i < spriteRenderer.Length; i++)
            {
                spriteRenderer_.flipX = !spriteRenderer*.flipX;*_

}
}

animator.SetBool(“grounded”, grounded);
animator.SetFloat(“velocityX”, Mathf.Abs(velocity.x) / maxSpeed);

targetVelocity = move * maxSpeed;
}
}

You can change the X scale to flip the whole object to get a similar effect than flipping the sprites. I guess something like this should work:

     Vector3 scale = transform.localScale;
     bool flip = (scale.x < 0.0f ? (move.x > 0.01f) : (move.x < 0.01f)); // this assumes that a positive X scale is the default state, so a negative x would indicate an already flipped character
     if (flip)
     {
         scale.x *= -1.0f;
         transform.localScale = scale;
     }

Try that instead of the “bool flipSprite” code.