public bool createRegion(int x, int y, RegionInfo regionInfo)
{
/*
* Construct a region for the given position in the city.
*/
// Validate the supplied parameters and internal ones.
// If a region already exists at the specified position just exit.
if (!m_fEnabled || !m_fInitialised || cityConfig==null)
{
m_log.Info("[CITY BUILDER]: FAIL! not enabled, initialised or no configuration");
return (false);
}
if (cityMap.Equals(null) || cityMap.cityRegions.Equals(null))
return (false);
// Now ask the scene manager to construct the region.
if (!sceneManager.Equals(null))
{
IScene scene = (IScene)cityMap.cityRegions[x, y];
sceneManager.CreateRegion(regionInfo, out scene);
}
else
{
m_log.Info("[CITY BUILDER]: NO SCENE MANAGER");
return (false);
}
// Job done, exit with OK.
return (true);
}