public void StopPull() { var oldPuller = _puller; if (oldPuller == null) { return; } _puller = null; if (ControlledComponent == null) { return; } ControlledComponent.WakeBody(); var message = new PullStoppedMessage(this, oldPuller, ControlledComponent); oldPuller.Owner.SendMessage(null, message); ControlledComponent.Owner.SendMessage(null, message); ControlledComponent.TryRemoveController <PullController>(); }
public void StopPull() { _puller = null; ControlledComponent?.TryRemoveController <PullController>(); }