private void Suck(EnemyStateController controller) { bool playerLooking = controller.IsSeen(); if (playerLooking) { Vector3 newPos = controller.HeroTransform.position; Vector3 dir = controller.transform.position - newPos; controller.Hero.GetComponent <Rigidbody2D>().AddForce(dir.normalized * 375f, ForceMode2D.Force); } }
private bool isSeen(EnemyStateController controller) { return(controller.IsSeen()); }