public bool ContainsLinesOfType(CutLineType type) { bool doesContain = false; for (int i = 0; i < LinesToCut.Count && !doesContain; i++) { if (LinesToCut[i].CutType == type) { doesContain = true; } } return(doesContain); }
public List <CutLine> RetrieveLines(CutLineType cutType, int stepNumber) { List <CutLine> lines = new List <CutLine>(); foreach (CutLine cl in LinesToCut) { StepID step = cl.GetComponent <StepID>(); if (step.UsedInStep(stepNumber) && cl.CutType == cutType) { lines.Add(cl); } } return(lines); }
public List <GameObject> GetPiecesByLine(CutLineType line) { List <GameObject> materials = new List <GameObject>(); foreach (GameObject go in WoodMaterials) { WoodMaterialObject wood = go.GetComponent <WoodMaterialObject>(); if (wood != null) { if (wood.ContainsLinesOfType(line)) { materials.Add(go); } } } return(materials); }