private Entity spawnEntity(int cellId, int entityId, string displayedName, float r, float g, float b) { if (!gameLogic.entityList.ContainsKey(entityId)) { Entity e = gameLogic.spawnEntity(cellId, entityId); e.setDisplayedName(displayedName); e.setColor(r, g, b); return(e); } else { return(gameLogic.entityList[entityId]); } }