예제 #1
0
 public void InitializeTests()
 {
     _userInfo        = Newtonsoft.Json.JsonConvert.DeserializeObject <UserInfo>(_settingsText);
     connectionString = "Data Source=" + _userInfo.Server + ";Initial Catalog=" + _userInfo.Database +
                        ";Persist Security Info=True;User ID="
                        + _userInfo.Username + ";Password=" + _userInfo.Password;
     myUploader = new MapUploader(connectionString);
 }
예제 #2
0
    void Update()
    {
        tick -= Time.deltaTime;

        // if there is anything in the queue and we're not on the way
        if (isWalking && isAutomatic)
        {
            transform.position = Vector3.MoveTowards(transform.position, target, Time.deltaTime * speed);
            if (transform.position == target)
            {
                isWalking = false;
            }
        }

        mutex.WaitOne();
        if (movementQueue.Count > 0 && !isWalking && isAutomatic)
        {
            // take a new destination
            target    = movementQueue.Dequeue();
            isWalking = true;
        }
        mutex.ReleaseMutex();

        if (tick < 0 && !isWalking && !isSentRequest)
        {
            Vector3 newPoint = MapUploader.GetRandomPointOnMap();
            while (newPoint == transform.position)
            {
                newPoint = MapUploader.GetRandomPointOnMap();
            }
            RequestForPath(newPoint);
            isSentRequest = true;
            tick          = coolDown;
        }

        text.text = "(" + destination.x + "," + destination.y + ")";
    }
예제 #3
0
파일: Tests.cs 프로젝트: Pacesetter/KML2SQL
 public void CheckNPAGeometry()
 {
     myUploader = new MapUploader(connectionString, "polygon", @"TestData\npa.kml", "myTable", 4326, false, log, logdir);
     myUploader.Upload();
 }
예제 #4
0
파일: Tests.cs 프로젝트: Pacesetter/KML2SQL
 public void SchoolTestGeometry()
 {
     myUploader = new MapUploader(connectionString, "polygon", @"TestData\school.kml", "myTable", 4326, false, log, logdir);
     myUploader.Upload();
 }
예제 #5
0
파일: Tests.cs 프로젝트: Pacesetter/KML2SQL
 public void BasicKML()
 {
     myUploader = new MapUploader(connectionString, "polygon", @"TestData\Basic.kml", "myTable", 4326, true, log, logdir);
     myUploader.Upload();
 }