public WaveSlot[, , ] CreateWaveSlotGrid(IntVector3 start, IntVector3 end) { waveSlotGridStartCoordinate = new IntVector3(Mathf.Min(start.X, end.X), Mathf.Min(start.Y, end.Y), Mathf.Min(start.Z, end.Z)); waveSlotGridEndCoordinate = new IntVector3(Mathf.Max(start.X, end.X), Mathf.Max(start.Y, end.Y), Mathf.Max(start.Z, end.Z)); var size = waveSlotGridEndCoordinate - waveSlotGridStartCoordinate; waveSlotGrid = new WaveSlot[size.X, size.Y, size.Z]; waveSlotCoordinateList = new List <IntVector3>(); for (int i = 0; i < size.X; i++) { for (int j = 0; j < size.Y; j++) { for (int k = 0; k < size.Z; k++) { waveSlotGrid[i, j, k] = new WaveSlot(new IntVector3(i, j, k), collaspeSystem, waveList.Count, unCollaspedPortsPreset, unCollaspedWavesWeightPreset); waveSlotCoordinateList.Add(new IntVector3(i, j, k)); } } } return(waveSlotGrid); }
public void AddToCollaspeArray(WaveSlot waveSlot) { toCollaspeWaveSlotArray.Add(waveSlot); }