/** *<summary> * Retuns a 2D array of integers representing whether a tile had a surplus or deficit of food for this tick *</summary> */ int[,] calculateSurplusValues(NodeTickInputData[,] tickInputData, Queue <NodePosition>[] nodePosQueue) { int[,] retValue = new int[NodeManager.MapWidth, NodeManager.MapLength]; for (int i = 1; i < DataManager.amountOfCreatures - 1; i++) { NodePosition workingNode; while (nodePosQueue[i].Count > 0) { workingNode = nodePosQueue[i].Dequeue(); retValue[workingNode.xIndex, workingNode.zIndex] = calculateTileSurplus(getCurrentCreatureAmountsByTile(NodeManager.getNode(workingNode).type), tickInputData[workingNode.xIndex, workingNode.zIndex]); } } return(retValue); }
/** *<summary> * Responds to <see cref="NodeManager.activeNodeUpdateEvent"/> * Updates the active node <see cref="NodePosition"/> *</summary> */ void OnActiveNodeUpdate(NodePosition nodePos) { activeNode = nodePos; control.controlEnabled = true; setSliderValue(NodeManager.getNode(nodePos).creatureAmounts[statIndex]); }