예제 #1
0
 /// <summary>
 /// Create a command object.
 /// </summary>
 /// <param name="agent">The agent used for ranking and main location searching.</param>
 /// <param name="footprint">The footprint that will be used for location researching.</param>
 /// <returns>The command object</returns>
 public static ICommand Create(IAgent agent, IFootprint <T> footprint)
 {
     return(new FindTargetInFootprint <T>
     {
         agent = agent,
         footprint = footprint
     });
 }
예제 #2
0
        /// <summary>
        /// Creates the BroadcastFootprintAdvertisement command.
        /// </summary>
        /// <param name="item">A map item</param>
        /// <param name="footprint">The item footprint.</param>
        /// <returns>A BroadcastFootprintAdvertisement command.</returns>
        public static ICommand Create(AbstractItem item, IFootprint <T> footprint)
        {
            BroadcastFootprintAdvertisement <T> command = new BroadcastFootprintAdvertisement <T>
            {
                advertisingMapElement = item,
                monoBehaviour         = item,
                footprint             = footprint
            };

            return(command);
        }
예제 #3
0
        /// <summary>
        /// Creates the BroadcastFootprintAdvertisement command.
        /// </summary>
        /// <param name="agent">An advertising agent</param>
        /// <param name="footprint">The agent footprint.</param>
        /// <returns>A BroadcastFootprintAdvertisement command.</returns>
        public static ICommand Create(AbstractAgent agent, IFootprint <T> footprint)
        {
            BroadcastFootprintAdvertisement <T> command = new BroadcastFootprintAdvertisement <T>
            {
                advertisingMapElement = agent,
                excludeReceiver       = agent,
                monoBehaviour         = agent,
                footprint             = footprint
            };

            return(command);
        }