Example #1
0
 public void RelocateUserRandomly()
 {
     if (AllObjects.Count > 0)
     {
         Random r        = new Random();
         var    location = AllObjects.ElementAt(r.Next(0, AllObjects.Count)).Location;
         log.Info(string.Format("Relocating user to {0}, {1}", location.Latitude, location.Longitude));
         sc.SetDataOnUserSimObject(new SIMCONNECT_DATA_INITPOSITION(location.Latitude, location.Longitude, 3000, 0, 0, 0, false, 0));
     }
     else
     {
         string message = appName + ": Unable to relocate user.  No fire locations found.";
         log.Warning(message);
         sc.Text(SIMCONNECT_TEXT_TYPE.PRINT_WHITE, 5.0f, Requests.DisplayText, message);
     }
 }