Exemple #1
0
 public SJob(JobData data)
 {
     uid           = data.UID;
     packageWeight = data.packageWeight;
     costFunction  = data.costFunction?.Serialize();
     completedOn   = data.completed?.Serialize();
     deadline      = data.deadline?.Serialize();
     status        = data.status;
     pickup        = data.pickup;
     destination   = data.dropoff;
     droneUID      = data.drone;
 }
 public SRetiredDrone(RetiredDroneData data)
 {
     uid = data.UID;
     isDroneCollision = data.isDroneCollision;
     hub            = data.hub;
     assignedJob    = data.job;
     packageworth   = data.packageWorth;
     destroyed      = data.destroyedTime.Serialize();
     waypoint       = data.waypoint;
     location       = data.collisionLocation;
     completedJobs  = new List <uint>();
     otherDroneName = data.otherDrone;
     otherUID       = data.otherUID;
     charge         = data.batteryCharge;
     foreach (var job in data.completedJobs.Keys)
     {
         completedJobs.Add(job);
     }
 }