Example #1
0
    public PipeCell(Vector3 worldPos, Vector3Int gridPos)
    {
        worldPoint   = worldPos;
        gridPosition = gridPos;

        watertype = WaterTypes.NoWater;
        pipeType  = PipeTypes.Empty;
        pipeForm  = PipeForms.Hidden;
    }
Example #2
0
 public void DisabledPipe()
 {
     pipeForm  = PipeForms.Hidden;
     pipeType  = PipeTypes.Empty;
     watertype = WaterTypes.NoWater;
 }
Example #3
0
 public void SetPipe(PipeTypes type, PipeForms form, float angleY)
 {
     pipeType = type;
     pipeForm = form;
     angle    = angleY;
 }
Example #4
0
    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");
        }
    }