private Task InitializeDisplay(int charSpawnX, int charSpawnY) { return(Task.Run(() => { try { _mapData = _mapLoader.InitializeMap(charSpawnX, charSpawnY); _lastPositionProcessed = new Point(charSpawnX, charSpawnY); PhysicalEngine.Instance.DeclareMapData(_mapData); // InitialSetup foreach (var chunkData in _mapData.Chunks) { var chunk = new Chunk(chunkData); _chunksContainer.AddContent(chunk); _chunks.Add(chunk); } _isUpdateting = false; } catch (Exception e) { _logger.Log(e.ToString()); } })); }