/// <summary> /// Submits all this object to the instance. /// </summary> /// <param name="instance">The instance to submit to.</param> /// <returns>The original object created at the instance.</returns> public QueueGuard Submit(Instance instance) { Waypoint from = instance.GetWaypointByID(From); Waypoint to = instance.GetWaypointByID(To); QueueSemaphore semaphore = instance.GetSemaphoreByID(Semaphore); return(semaphore.RegisterGuard(from, to, Entry, Barrier)); }
private void generateGuard(int[,] info, bool entry, bool barrier) { int rowFrom = info[0, 0]; int columnFrom = info[0, 1]; int rowTo = info[1, 0]; int columnTo = info[1, 1]; Waypoint from = tiles[rowFrom, columnFrom].wp; Waypoint to = tiles[rowTo, columnTo].wp; semaphore.RegisterGuard(from, to, entry, barrier); }