protected void LoadTerrainImpl(TerrainSlot slot, bool synchronous)
{
if (!synchronous)
throw new NotSupportedException("Loading terrain asynchronous is not yet supported!");
if (slot.Instance == null &&
(string.IsNullOrEmpty(slot.Def.FileName) || slot.Def.ImportData != null))
{
slot.Instance = new Terrain(_sceneManager);
slot.Instance.ResourceGroup = _resourceGroup;
slot.Instance.Prepare(_defaultImportData);
slot.Instance.Position = GetTerrainSlotPosition(slot.X, slot.Y);
slot.Instance.Load();
// hook up with neighbours
for (int i = -1; i <= 1; ++i)
{
for (int j = -1; j <= 1; ++j)
{
if (i != 0 || j != 0)
ConnectNeighbour(slot, i, j);
}
}
}
}
}