public void DirectUpdate() { if (!_mapCoordinates.IsOutOfMap(_targetTransform.position)) { return; } TeleportPlayer(); }
public override void DirectUpdate() { if (!_mapCoordinates.IsOutOfMap(transform.position)) { return; } Deactivate(); }
private void TryDestroy() { var isOutOfMap = _mapCoordinates.IsOutOfMap(transform.position); if (isOutOfMap && _isJustSpawned) { return; } if (!isOutOfMap && _isJustSpawned) { _isJustSpawned = false; return; } if (!isOutOfMap) { return; } Deactivate(); }