// Attach the temporary materials and script to the current selection piece. void AttachTemporaryPieceController(WheelOption option) { option.GetCurrentPiece().AddComponent <TemporaryPieceController>(); option.GetCurrentPiece().GetComponent <TemporaryPieceController>().invalidPlacementMat = invalidPlacementMat; option.GetCurrentPiece().GetComponent <TemporaryPieceController>().validPlacementMat = validPlacementMat; option.GetCurrentPiece().GetComponent <TemporaryPieceController>().selectorMat = selectorMat; option.GetCurrentPiece().GetComponent <TemporaryPieceController>().linkedMat = linkedMat; }
private WheelOption[] BlankOptions() { var blankWheelOptions = new WheelOption[6]; blankWheelOptions[0] = new WheelOption("", colours[0]); blankWheelOptions[1] = new WheelOption("", colours[1]); blankWheelOptions[2] = new WheelOption("", colours[0]); blankWheelOptions[3] = new WheelOption("", colours[1]); blankWheelOptions[4] = new WheelOption("", colours[0]); blankWheelOptions[5] = new WheelOption("", colours[1]); return(blankWheelOptions); }
void RemoveTemporaryPieceController(WheelOption option) { Destroy(option.GetCurrentPiece ().GetComponent <TemporaryPieceController> ()); }