Esempio n. 1
0
        public void Setup()
        {
            if (IsCompleted)
            {
                return;
            }

            if (_cargo.CurrentDestination == _route.End)
            {
                IsCompleted = true;
                return;
            }

            if (_transport == null)
            {
                _transport = _transportManager.GetTransportAt(_cargo.CurrentDestination, _route.TransportKind);
                _transport?.PlanDelivery(new[] { _cargo }, _route);
            }
        }