public bool CheckForPlayer() { bool checkForPlayer = false; if (this.PhysicsContainer.Object.CheckForPlayerDiagonally(this.FacingRight, sightForPlayerDistance, sightForPlayerAngle)) { this.StopMoving(); // find a better way to do this - set him Idle in the meantime *** checkForPlayer = true; } else if (this.PhysicsContainer.Object.CheckForPlayerDiagonally(this.FacingRight, sightForPlayerDistance, sightForPlayerAngle + sightForPlayerAngleOffset)) { this.StopMoving(); // same as above *** checkForPlayer = true; } return(Vision.CheckForPlayer(checkForPlayer)); }
public bool CheckForPlayer() { return Vision.CheckForPlayer(this.PhysicsContainer.Object.CheckForPlayerHorizontally(this.FacingRight, sightForPlayerDistance)); }