private bool CheckIsBlocker() { if (MovementController.CheckChangeDirectionOrders() != Direction.None) { return(false); } return(stateController.checkIsBlocker()); }
public Direction CheckChangeDirectionOrders() { int hits = Physics.OverlapSphereNonAlloc(targetPositionAddress, 0.5f, overlapSphereHits, lemmingsActionLayerMask); for (int i = 0; i < hits; i++) { var hit = overlapSphereHits[i]; LemmingStateController otherLemmingStateController = hit.GetComponentInParent <LemmingStateController>(); if (otherLemmingStateController != null) { if (otherLemmingStateController.checkIsBlocker()) { var direction = otherLemmingStateController.BlockingDirection; return(direction); } } } return(Direction.None); }