How do I check a 2D sprite's rotation

I’ve tried numerous different ways but with no luck. I’m kind of rusty at C#. I need to check whether my sprite has turned 180 degrees or not and if so for my function to run.

if(male.transform.rotation.eulerAngles.z(0,0)
{

}

That obviously doesn’t work so if anyone can help if would be greatly appreciated.

Looks like you are on the right track. Try the following code snippet.

if (transform.rotation.eulerAngles.z < 181 && transform.rotation.eulerAngles.z > 179)
{
    Debug.Log ("do something special");
}