コード例 #1
0
        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>();
        }
コード例 #2
0
 public void StopPull()
 {
     _puller = null;
     ControlledComponent?.TryRemoveController <PullController>();
 }