RunnerBehavior.Flip C# (CSharp) Method

Flip() public method

public Flip ( ) : void
return void
    public void Flip()
    {
        mobFacingRight = !mobFacingRight;
        Vector3 theScale = transform.localScale;
        theScale.x *= -1;
        transform.localScale = theScale;
        Vector3 thePos = transform.position;
        thePos.x += (facingDir.x / Vector2.right.x) * 0.106f;
        transform.position = thePos;
    }