Checking to see if the player is facing an enemy? (c#)

Hey guys, this is less of a “fix my error” question and more of just me seeking some advice from more seasoned programmers. I’m working on a 2.5D platformer game, and I’m making an enemy that is basically a boo from mario games (moves towards you when you look away, stops when you look at it). Generally speaking, I’ve got just about everything set up, except for one thing: checking to see if the player is facing the boo or not. I’ve been playing around with figuring out what direction the player is facing based on recent keystrokes, and that I’ve got working. However I can’t seem to figure out how to check which direction the boo-like enemy is facing. I tried something with it’s rotation, but I couldn’t get that working. Does anyone have any suggestions on the best way to approach this? What I have now is just my best guess, if you know a method completely different, please go ahead and post it. Code snippets are always helpful, but not required here (however I’ll post my code here if anyone wants to see). Thanks a ton

public float speedH = 3f;
public float lookingDirection;

public bool					facingHero;
public bool					heroFacingLeft = false;
public bool					heroFacingRight = true;

void Update () {
	GameObject theHero = GameObject.FindWithTag ("Player");
	if(facingHero == false){
		lookingDirection = -90;
		transform.Rotate(lookingDirection, 0, 90);
       //this movement code kind of just sends the boo upwards, and needs work, 
       //but it's not what I'm asking
		rigidbody.velocity = transform.forward * speedH;
	if(facingHero == true){
		rigidbody.velocity = new Vector3(0, 0, 0);
		lookingDirection = 90;		
		transform.Rotate(lookingDirection, 0, 90);
	if(Input.GetKeyUp(KeyCode.A) || Input.GetKeyUp(KeyCode.LeftArrow)){
		heroFacingLeft = true;
		heroFacingRight = false;
	if(Input.GetKeyUp(KeyCode.D) || Input.GetKeyUp(KeyCode.RightArrow)){
		heroFacingLeft = false;
		heroFacingRight = true;

Oh yeah, i should also mention that I can’t alter the script for the player character (this is inevitably going to be for a group project)

All working now