private void Update() { if (mapDataThreadInfoQueue.Count > 0) { while (0 < mapDataThreadInfoQueue.Count) { MapThreadInfo <MapData> threadInfo = mapDataThreadInfoQueue.Dequeue(); threadInfo.callback(threadInfo.parameter); } } if (meshDataThreadInfoQueue.Count > 0) { while (0 < meshDataThreadInfoQueue.Count) { MapThreadInfo <MeshData> threadInfo = meshDataThreadInfoQueue.Dequeue(); threadInfo.callback(threadInfo.parameter); } } if (prefabDataInfoQueue.Count > 0) { while (0 < prefabDataInfoQueue.Count) { MapThreadInfo <PreFabData> threadInfo = prefabDataInfoQueue.Dequeue(); threadInfo.callback(threadInfo.parameter); } } }
void Update() { if (chunkDataThreadInQueue.Count > 0) { for (int i = 0; i < chunkDataThreadInQueue.Count; i++) { MapThreadInfo <WorldChunkData> threadInfo = chunkDataThreadInQueue.Dequeue(); threadInfo.callback(threadInfo.parameter); } } if (chunkComputedThreadInQueue.Count > 0) { for (int i = 0; i < chunkComputedThreadInQueue.Count; i++) { MapComputingThreadInfo <WorldChunkComputed> threadInfo = chunkComputedThreadInQueue.Dequeue(); threadInfo.callback(threadInfo.parameter); } } if (chunkMeshThreadInQueue.Count > 0) { for (int i = 0; i < chunkMeshThreadInQueue.Count; i++) { MeshDataThreadInfo <MeshData> threadInfo = chunkMeshThreadInQueue.Dequeue(); threadInfo.callback(threadInfo.parameter); } } }
void Update() { lock (mapDataThreadInfoQueue) { if (mapDataThreadInfoQueue.Count > 0) { for (int i = 0; i < mapDataThreadInfoQueue.Count; i++) { MapThreadInfo <MapData> threadInfo = mapDataThreadInfoQueue.Dequeue(); threadInfo.callback(threadInfo.parameter); } } } lock (meshDataThreadInfoQueue) { if (meshDataThreadInfoQueue.Count > 0) { for (int i = 0; i < meshDataThreadInfoQueue.Count; i++) { MapThreadInfo <MeshData> threadInfo = meshDataThreadInfoQueue.Dequeue(); threadInfo.callback(threadInfo.parameter); } } } }
void Update() { if (terrainData.reset || noiseData.reset) { textureData.ApplyToMaterial(terrainMaterial); terrainData.reset = false; noiseData.reset = false; } if (mapDataTheadInfoQueue.Count > 0) { for (int i = 0; i < mapDataTheadInfoQueue.Count; i++) { MapThreadInfo <MapData> threadInfo = mapDataTheadInfoQueue.Dequeue(); threadInfo.callback(threadInfo.parameter); } } if (meshDataTheadInfoQueue.Count > 0) { for (int i = 0; i < meshDataTheadInfoQueue.Count; i++) { MapThreadInfo <MeshData> threadInfo = meshDataTheadInfoQueue.Dequeue(); threadInfo.callback(threadInfo.parameter); } } }
void Update() { int countMapDataThreadqueue = mapDataThreadQueue.Count; int countMeshDataThreadqueue = meshDataThreadQueue.Count; if (countMapDataThreadqueue > 0) { for (int i = 0; i < countMapDataThreadqueue; i++) { //info next item out of the que MapThreadInfo <MapData> threadInfo = mapDataThreadQueue.Dequeue(); threadInfo.callback(threadInfo.parameter); } } if (countMeshDataThreadqueue > 0) { for (int i = 0; i < countMeshDataThreadqueue; i++) { //info next item out of the que MapThreadInfo <MeshData> threadInfo = meshDataThreadQueue.Dequeue(); threadInfo.callback(threadInfo.parameter); } } }
// Update is called once per frame void Update() { if (threadQueue.Count > 0) { for (int i = 0; i < threadQueue.Count; i++) { MapThreadInfo mapThreadInfo = threadQueue.Dequeue(); mapThreadInfo.callback(mapThreadInfo.platforms); } } }
void Update() { while (mapDataThreadInfoQueue.Count > 0) { MapThreadInfo <MapData> threadInfo = mapDataThreadInfoQueue.Dequeue(); threadInfo.callback(threadInfo.parameter); } while (meshDataThreadInfoQueue.Count > 0) { MapThreadInfo <MeshData> threadInfo = meshDataThreadInfoQueue.Dequeue(); threadInfo.callback(threadInfo.parameter); } }
private void CheckMeshDataThreadInfoQueue() { if (_meshDataThreadInfoQueue.Count > 0) { for (int i = 0; i < _meshDataThreadInfoQueue.Count; i++) { if (_meshDataThreadInfoQueue.Count > 0) { MapThreadInfo <MeshData> threadInfo = _meshDataThreadInfoQueue.Dequeue(); threadInfo.callback(threadInfo.parameter); } } } }
private void Update() { for (int i = 0; i < mapDataThreadInfoQueue.Count; i++) { MapThreadInfo <float[, ]> threadInfo = mapDataThreadInfoQueue.Dequeue(); threadInfo.callback(threadInfo.parameter); } for (int i = 0; i < meshDataThreadInfoQueue.Count; i++) { MapThreadInfo <MeshData> threadInfo = meshDataThreadInfoQueue.Dequeue(); threadInfo.callback(threadInfo.parameter); } }
private void Update() { if (MapDataInfoQueue.Count > 0) { for (int i = 0; i < MapDataInfoQueue.Count; i++) { MapThreadInfo <MapData> threadInfo = MapDataInfoQueue.Dequeue(); threadInfo.callback(threadInfo.param); } } if (MeshDataInfoQueue.Count > 0) { for (int i = 0; i < MeshDataInfoQueue.Count; i++) { MapThreadInfo <MeshData> threadInfo = MeshDataInfoQueue.Dequeue(); threadInfo.callback(threadInfo.param); } } }
void Update() { if (heightMapThreadInfoQueue.Count > 0) { for (int i = 0; i < heightMapThreadInfoQueue.Count; i++) { MapThreadInfo <HeightMap> threadInfo = heightMapThreadInfoQueue.Dequeue(); threadInfo.callback(threadInfo.parameter); } } if (meshDataThreadInfoQueue.Count > 0) { for (int i = 0; i < meshDataThreadInfoQueue.Count; i++) { MapThreadInfo <MeshData> threadInfo = meshDataThreadInfoQueue.Dequeue(); threadInfo.callback(threadInfo.parameter); } } }
void Update() { if (mapDataThreadInfoQueueNr.Count > 0) //as long there are threads { for (int i = 0; i < mapDataThreadInfoQueueNr.Count; i++) { MapThreadInfo <MapData> threadInfo = mapDataThreadInfoQueueNr.Dequeue(); //Dequeue: the next thing in the queue threadInfo.callback(threadInfo.parameter); } } if (meshDataThreadInfoQueueNr.Count > 0) { for (int i = 0; i < meshDataThreadInfoQueueNr.Count; i++) { MapThreadInfo <MeshData> threadInfo = meshDataThreadInfoQueueNr.Dequeue(); threadInfo.callback(threadInfo.parameter); } } }
private void Update() { //Used as an endpoint for all threads, where the data they passed into their thread info queue is sent to the respective caller if (heightMapThreadInfoQueue.Count > 0) { for (int i = 0; i < heightMapThreadInfoQueue.Count; i++) { MapThreadInfo <HeightMap> threadInfo = heightMapThreadInfoQueue.Dequeue(); threadInfo.callback(threadInfo.parameter); } } if (meshDataThreadInfoQueue.Count > 0) { for (int i = 0; i < meshDataThreadInfoQueue.Count; i++) { MapThreadInfo <MeshData> threadInfo = meshDataThreadInfoQueue.Dequeue(); threadInfo.callback(threadInfo.parameter); } } }
void Update() { if (mapDataThreadInfoQueue.Count > 0) { for (int i = 0; i < mapDataThreadInfoQueue.Count; i++) { MapThreadInfo <MapData> threadInfo = mapDataThreadInfoQueue.Dequeue(); // The next thing in the queue threadInfo.callback(threadInfo.parameter); } } /*if (meshDataThreadInfoQueue.Count > 0) * { * for (int i = 0; i < meshDataThreadInfoQueue.Count; i++) * { * MapThreadInfo<MeshData> threadInfo = meshDataThreadInfoQueue.Dequeue(); * threadInfo.callback(threadInfo.parameter); * } * }*/ }
void Update() { if (mapDataInfoQueue.Count > 0) { for (int i = 0; i < mapDataInfoQueue.Count; i++) { MapThreadInfo <MapData> mti = mapDataInfoQueue.Dequeue(); mti.callback(mti.parameter); } } if (meshDataInfoQueue.Count > 0) { for (int i = 0; i < meshDataInfoQueue.Count; i++) { MapThreadInfo <MeshData> mdi = meshDataInfoQueue.Dequeue(); mdi.callback(mdi.parameter); } } }
void Update() { if (this.mapDataThreadInfoQueue.Count > 0) { for (int c = 0; c < this.mapDataThreadInfoQueue.Count; c++) { MapThreadInfo <MapData> threadInfo = this.mapDataThreadInfoQueue.Dequeue(); threadInfo.callback(threadInfo.parameter); // callbacks are a mystifying thing } } if (this.meshDataThreadInfoQueue.Count > 0) { for (int c = 0; c < this.meshDataThreadInfoQueue.Count; c++) { MapThreadInfo <MeshData> threadInfo = this.meshDataThreadInfoQueue.Dequeue(); threadInfo.callback(threadInfo.parameter); } } }
void Update() { if (mapDataThreadInfoQueue.Count > 0) // if there are new map data in queue { for (int i = 0; i < mapDataThreadInfoQueue.Count; i++) { MapThreadInfo <MapData> threadInfo = mapDataThreadInfoQueue.Dequeue(); threadInfo.callback(threadInfo.parameter); } } if (meshDataThreadInfoQueue.Count > 0) { for (int i = 0; i < meshDataThreadInfoQueue.Count; i++) { MapThreadInfo <MeshData> threadInfo = meshDataThreadInfoQueue.Dequeue(); threadInfo.callback(threadInfo.parameter); } } }
private void Update() { if (mapDataThradInfoQueue.Count > 0) // wenn sich ein Element in der Warteschlange befindet { for (int i = 0; i < mapDataThradInfoQueue.Count; i++) { MapThreadInfo <MapData> threadInfo = mapDataThradInfoQueue.Dequeue(); //entfernt das erste element aus der Queue und schreibt dieses in die threadInfo Variable. threadInfo.callback(threadInfo.parameter); } } if (meshDataThreadInfoQueue.Count > 0) { for (int i = 0; i < meshDataThreadInfoQueue.Count; i++) { MapThreadInfo <MeshData> threadInfo = meshDataThreadInfoQueue.Dequeue(); threadInfo.callback(threadInfo.parameter); } } }
void Update() { if (mapDataThreadInfoQueue.Count > 0) { //If the queue has something in it then loop through the elements for (int i = 0; i < mapDataThreadInfoQueue.Count; i++) { MapThreadInfo <MapData> threadInfo = mapDataThreadInfoQueue.Dequeue(); threadInfo.callback(threadInfo.parameter); } } if (meshDataThreadInfoQueue.Count > 0) { for (int i = 0; i < meshDataThreadInfoQueue.Count; i++) { MapThreadInfo <MeshData> threadInfo = meshDataThreadInfoQueue.Dequeue(); threadInfo.callback(threadInfo.parameter); } } }
// Update is called once per frame void Update() { // Process next MapData in thread Queue if (mapDataThreadInfoQueue.Count > 0) { for (int i = 0; i < mapDataThreadInfoQueue.Count; i++) { MapThreadInfo <MapData> threadInfo = mapDataThreadInfoQueue.Dequeue(); threadInfo.callback(threadInfo.parameter); } } // Process next MeshData in thread Queue if (meshDataThreadInfoQueue.Count > 0) { for (int i = 0; i < meshDataThreadInfoQueue.Count; i++) { MapThreadInfo <MeshData> threadInfo = meshDataThreadInfoQueue.Dequeue(); threadInfo.callback(threadInfo.parameter); } } }
private void Update() { //If there is more than one element within the queue, loop through all elements, proceed to dequeue them, and call callback if (mapDataThreadInfoQueue.Count > 0) { for (int i = 0; i < mapDataThreadInfoQueue.Count; i++) { MapThreadInfo<MapData> threadInfo = mapDataThreadInfoQueue.Dequeue(); threadInfo.callback(threadInfo.parameter); } } if (meshDataThreadInfoQueue.Count > 0) { for (int i = 0; i < meshDataThreadInfoQueue.Count; i++) { MapThreadInfo<MeshData> threadInfo = meshDataThreadInfoQueue.Dequeue(); threadInfo.callback(threadInfo.parameter); } } }
public void UpdateCallbacks() { //Go through callbacks if (noiseMapThreadInfoQueue.Count > 0) { for (int i = 0; i < noiseMapThreadInfoQueue.Count; i++) { MapThreadInfo <float[, ]> threadInfo = noiseMapThreadInfoQueue.Dequeue(); threadInfo.callback(threadInfo.parameter); } } if (placableMapThreadInfoQueue.Count > 0) { for (int i = 0; i < placableMapThreadInfoQueue.Count; i++) { MapThreadInfo <bool[, ]> threadInfo = placableMapThreadInfoQueue.Dequeue(); threadInfo.callback(threadInfo.parameter); } } }
private void Update() { if (mapDataTheradInfoQueue.Count > 0) { for (int i = 0; i < mapDataTheradInfoQueue.Count; i++) { // If there is data in the queue, pop it off and render (using the callback function) MapThreadInfo <MapData> threadInfo = mapDataTheradInfoQueue.Dequeue(); threadInfo.callback(threadInfo.parameter); } } if (meshDataTheradInfoQueue.Count > 0) { for (int i = 0; i < meshDataTheradInfoQueue.Count; i++) { // If there is data in the queue, pop it off and render (using the callback function) MapThreadInfo <MeshData> threadInfo = meshDataTheradInfoQueue.Dequeue(); threadInfo.callback(threadInfo.parameter); } } }
void Update() { // Loop through any items in our map callback queue and ask them to call their callback method with map data. if (mapDataThreadInfoQueue.Count > 0) { for (int i = 0; i < mapDataThreadInfoQueue.Count; i++) { MapThreadInfo <MapData> threadInfo = mapDataThreadInfoQueue.Dequeue(); threadInfo.callback(threadInfo.parameter); } } // Loop through any items in our mesh callback queue and ask them to call their callback method with map data. if (meshDataThreadInfoQueue.Count > 0) { for (int i = 0; i < meshDataThreadInfoQueue.Count; i++) { MapThreadInfo <MeshData> threadInfo = meshDataThreadInfoQueue.Dequeue(); threadInfo.callback(threadInfo.parameter); } } }
void Update() { if (mapDataThreadInfoQueue.Count > 0) // If there is something in the queue { for (int i = 0; i < mapDataThreadInfoQueue.Count; i++) // Loop through queue // Dequeue next object and execute callback function { MapThreadInfo <MapData> threadInfo = mapDataThreadInfoQueue.Dequeue(); threadInfo.callback(threadInfo.parameter); } } if (meshDataThreadInfoQueue.Count > 0) // If there is something in the queue { for (int i = 0; i < meshDataThreadInfoQueue.Count; i++) // Loop through queue // Dequeue next object and execute callback function { MapThreadInfo <MeshData> threadInfo = meshDataThreadInfoQueue.Dequeue(); threadInfo.callback(threadInfo.parameter); } } }
void Update() { if (mapDataThreadInfoQueue.Count > 0) { for (int i = 0; i < mapDataThreadInfoQueue.Count; i++) { MapThreadInfo <MapData> threadInfo = mapDataThreadInfoQueue.Dequeue(); threadInfo.callback(threadInfo.parameter); } } if (meshDataThreadInfoQueue.Count > 0) { for (int i = 0; i < meshDataThreadInfoQueue.Count; i++) { MeshThreadInfo <MeshData> threadInfo = meshDataThreadInfoQueue.Dequeue(); if (!default(MeshThreadInfo <MeshData>).Equals(threadInfo)) { threadInfo.callback(threadInfo.parameter); } } } }