public static int GetTerrainAmountsByType(byte terrainType, JEventBus eventBus = null) { FindTerrainCellsAmount findTerrainCellsAmount = new FindTerrainCellsAmount(terrainType); BaseApi.SendEvent(eventBus, findTerrainCellsAmount); return((int)findTerrainCellsAmount.Result); }
public void FindTerrainCellsAmountListener(FindTerrainCellsAmount findTerrainCellsAmount) { findTerrainCellsAmount.Success = true; findTerrainCellsAmount.Result = _counters[findTerrainCellsAmount.TerrainType]; }