public PipeCell(Vector3 worldPos, Vector3Int gridPos) { worldPoint = worldPos; gridPosition = gridPos; watertype = WaterTypes.NoWater; pipeType = PipeTypes.Empty; pipeForm = PipeForms.Hidden; }
public void DisabledPipe() { pipeForm = PipeForms.Hidden; pipeType = PipeTypes.Empty; watertype = WaterTypes.NoWater; }
public void SetPipe(PipeTypes type, PipeForms form, float angleY) { pipeType = type; pipeForm = form; angle = angleY; }
private string GetOpeningsId(PipeForms form, float rot) { switch (form) { case PipeForms.Hidden: return("0000"); case PipeForms.I_shape: switch (rot) { case 0f: return("0110"); case 90f: return("1001"); case 180f: return("0110"); case -90f: return("1001"); default: return("Error"); } case PipeForms.L_shape: switch (rot) { case 0f: return("1100"); case 90f: return("1010"); case 180f: return("0011"); case -90f: return("0101"); default: return("Error"); } case PipeForms.T_shape: switch (rot) { case 0f: return("1101"); case 90f: return("1110"); case 180f: return("1011"); case -90f: return("0111"); default: return("Error"); } case PipeForms.X_shape: return("1111"); default: return("Error"); } }