Ejemplo n.º 1
0
        public override bool canExecute()
        {
            if (targetVessel == null || targetVessel.vessel == null || this.location == null)
            {
                return(false);
            }

            /* Find target vessel location. */
            SupplyPoint targetLocation = targetVessel.currentLocation;

            if (targetLocation != null)
            {
                return(targetLocation.isVesselAtPoint(this.linkVessel.vessel));
            }
            else
            {
                Debug.LogError("[SupplyChain] Vessel " + targetVessel.trackingID.ToString() + " not in valid location!");
            }

            return(false);
        }