public void ReceiveStream(ResourceStream ReceivingStream, IOStreamDir ReceivingDir) { RemoveFromStream(ReceivingDir); Stream = ReceivingStream; animColor = ReceivingStream._streamColor; this.ManageStream(); }
public GridGameObject GetNeighbor(IOStreamDir dirToCheck) { GridGameObject returnObj = null; switch (dirToCheck) { case IOStreamDir.Top: // bool hasNeighbor = myGrid.hasNeighbor(wPos, hPos + 1); if (myGrid.getGridPiece(wPos, hPos - 1) != null) { if (myGrid.getGridPiece(wPos, hPos - 1).hasGridObject) { returnObj = myGrid.getGridPiece(wPos, hPos - 1).GridObj; if (returnObj.StreamInputs.Contains(IOStreamDir.Bottom)) { } else { returnObj = null; } } } break; case IOStreamDir.Right: if (myGrid.getGridPiece(wPos + 1, hPos) != null) { if (myGrid.getGridPiece(wPos + 1, hPos).hasGridObject) { returnObj = myGrid.getGridPiece(wPos + 1, hPos).GridObj; if (returnObj.StreamInputs.Contains(IOStreamDir.Left)) { } else { returnObj = null; } } } break; case IOStreamDir.Bottom: if (myGrid.getGridPiece(wPos, hPos + 1) != null) { if (myGrid.getGridPiece(wPos, hPos + 1).hasGridObject) { returnObj = myGrid.getGridPiece(wPos, hPos + 1).GridObj; if (returnObj.StreamInputs.Contains(IOStreamDir.Top)) { } else { returnObj = null; } } } break; case IOStreamDir.Left: if (myGrid.getGridPiece(wPos - 1, hPos) != null) { if (myGrid.getGridPiece(wPos - 1, hPos).hasGridObject) { returnObj = myGrid.getGridPiece(wPos - 1, hPos).GridObj; if (returnObj.StreamInputs.Contains(IOStreamDir.Right)) { } else { returnObj = null; } } } break; default: Debug.LogError("Cannot currently support passing :" + dirToCheck); break; } return(returnObj); }
public void RemoveFromStream(IOStreamDir ReceivingStream) { }