public GetNearestVolunteerCenter ( |
||
reference | Tile used as a reference point to find the nearest volunteer center | |
return | MSVolunteerCenter |
public void VolunteerCitizen(MSMap map) { MS3DTile bldg = map.GetRandomCitizenSource(); MS3DTile center = map.GetNearestVolunteerCenter(bldg); Node path = map.GetPath(bldg.TileCoordinate, center.TileCoordinate); MSVolunteeringCitizen v = new MSVolunteeringCitizen(bldg.Position + MSUnit.UNITZ_POSITION, path, map, 0); units.Add(v); }
public void SendWorkers(MSMap map, MSChangeableBuilding bldg, int qty) { MSVolunteerCenter center = map.GetNearestVolunteerCenter(bldg); Node path = map.GetPath(center.TileCoordinate, bldg.TileCoordinate); for (int i = 0; i < qty; i++) { MSWorker worker = new MSWorker(center.Position + MSUnit.UNITZ_POSITION, path, bldg, map, 0); units.Add(worker); } }