Esempio n. 1
0
 private static void Display(SearchRadius data, int indent)
 {
     if (data == null)
     {
         return;
     }
     DisplayLabel("Search Radius", indent);
     Display(data.place, indent + 1);
     Display(data.radius, indent + 1, "Radius");
 }
Esempio n. 2
0
 public bool Equals(KrigingConfig other)
 {
     if (other == null)
     {
         return(false);
     }
     return(SearchRadius.Equals(other.SearchRadius) &&
            SectorsCount.Equals(other.SectorsCount) &&
            MaxPointsInSector.Equals(other.MaxPointsInSector) &&
            NotDefinedValue.Equals(other.NotDefinedValue));
 }
Esempio n. 3
0
    /// <summary>
    /// Start this instance.
    /// </summary>
    protected override void Start()
    {
        base.Start();

        if (Managed)
        {
            EntityManager.AddToDictionary(_instanceID, this);
            EntityManager.AddToUpdateList(this);
        }

        _currentHealth = Health;
        _searchRadius  = GetComponentInChildren <SearchRadius>();

        OnSpawn();
    }
        /// <summary>
        ///
        /// </summary>
        /// <typeparam name="TReturn"></typeparam>
        /// <param name="dataSourceName"></param>
        /// <param name="searchRadius"></param>
        /// <param name="filter"></param>
        /// <param name="orderBy"></param>
        /// <param name="skip"></param>
        /// <param name="top"></param>
        /// <returns></returns>
        public async Task <List <TReturn> > Find <TReturn>(string dataSourceName, SearchRadius searchRadius,
                                                           string filter = "", string orderBy = "", int skip = 0, int top = 25) where TReturn : class
        {
            if (string.IsNullOrWhiteSpace(dataSourceName))
            {
                throw new ArgumentException("The dataSourceName cannot be blank.", "dataSourceName");
            }
            if (searchRadius == null)
            {
                throw new ArgumentException("searchRadius cannot be null.", "searchRadius");
            }

            var request = new RestRequest(DataSources[dataSourceName])
            {
                ContentType = ContentTypes.Json
            };

            request.AddQueryString("spatialFilter", string.Format("nearby({0})", searchRadius));
            PrepRequest(ref request, filter, orderBy, skip, top);
            var result = await ExecuteAsync <SpatialResponseListWrapper <TReturn> >(request);

            return(result.Response.Results);
        }
Esempio n. 5
0
 // Use this for initialization
 virtual public void Start()
 {
     ParentEntity       = gameObject.GetComponent <Entity>();  //find the entity we are attached to
     ParentSearchRadius = gameObject.GetComponent <SearchRadius>();
 }
Esempio n. 6
0
 // Use this for initialization
 public virtual void Start()
 {
     ParentEntity = gameObject.GetComponent<Entity>(); //find the entity we are attached to
     ParentSearchRadius = gameObject.GetComponent<SearchRadius>();
 }
Esempio n. 7
0
    /// <summary>
    /// Start this instance.
    /// </summary>
    protected override void Start()
    {
        base.Start();

        EntityManager.AddToDictionary(mInstanceID, this);

        if (Managed)
        {
            EntityManager.AddToUpdateList(this);
        }

        mCurrentHealth = Health;
        mSearchRadius = GetComponentInChildren<SearchRadius>();

        OnSpawn();
    }