Exemplo n.º 1
0
    public void activeStitching(StitchingCase s, bool value)
    {
        switch (s)
        {
        // 上4
        case StitchingCase.Top_Forward:
            topCamera.stitchingUp.gameObject.SetActive(value);
            forwardCamera.stitchingDown.gameObject.SetActive(value);
            break;

        case StitchingCase.Top_Right:
            topCamera.stitchingRight.gameObject.SetActive(value);
            rightCamera.stitchingUp.gameObject.SetActive(value);
            break;

        case StitchingCase.Top_Back:
            topCamera.stitchingDown.gameObject.SetActive(value);
            backCamera.stitchingUp.gameObject.SetActive(value);
            break;

        case StitchingCase.Top_Left:
            topCamera.stitchingLeft.gameObject.SetActive(value);
            leftCamera.stitchingUp.gameObject.SetActive(value);
            break;

        // 中4
        case StitchingCase.Back_Right:
            backCamera.stitchingRight.gameObject.SetActive(value);
            rightCamera.stitchingLeft.gameObject.SetActive(value);
            break;

        case StitchingCase.Right_Forward:
            rightCamera.stitchingRight.gameObject.SetActive(value);
            forwardCamera.stitchingLeft.gameObject.SetActive(value);
            break;

        case StitchingCase.Forward_Left:
            forwardCamera.stitchingRight.gameObject.SetActive(value);
            leftCamera.stitchingLeft.gameObject.SetActive(value);
            break;

        case StitchingCase.Left_Back:
            leftCamera.stitchingRight.gameObject.SetActive(value);
            backCamera.stitchingLeft.gameObject.SetActive(value);
            break;

        //下4
        case StitchingCase.Bottom_Forward:
            bottomCamera.stitchingDown.gameObject.SetActive(value);
            forwardCamera.stitchingUp.gameObject.SetActive(value);
            break;

        case StitchingCase.Bottom_Right:
            bottomCamera.stitchingRight.gameObject.SetActive(value);
            rightCamera.stitchingDown.gameObject.SetActive(value);
            break;

        case StitchingCase.Bottom_Back:
            bottomCamera.stitchingUp.gameObject.SetActive(value);
            backCamera.stitchingDown.gameObject.SetActive(value);
            break;

        case StitchingCase.Bottom_Left:
            bottomCamera.stitchingLeft.gameObject.SetActive(value);
            leftCamera.stitchingDown.gameObject.SetActive(value);
            break;
        }
    }
Exemplo n.º 2
0
    void stitchOne(StitchingCase s, bool value)
    {
        // 設定貼圖

        switch (s)
        {
        // 上4
        case StitchingCase.Top_Forward:
            topTerrain.stitchingUp.gameObject.SetActive(value);
            forwardTerrain.stitchingDown.gameObject.SetActive(value);
            break;

        case StitchingCase.Top_Right:
            topTerrain.stitchingRight.gameObject.SetActive(value);
            rightTerrain.stitchingUp.gameObject.SetActive(value);
            break;

        case StitchingCase.Top_Back:
            topTerrain.stitchingDown.gameObject.SetActive(value);
            backTerrain.stitchingUp.gameObject.SetActive(value);
            break;

        case StitchingCase.Top_Left:
            topTerrain.stitchingLeft.gameObject.SetActive(value);
            leftTerrain.stitchingUp.gameObject.SetActive(value);
            break;

        // 中4
        case StitchingCase.Back_Right:
            backTerrain.stitchingRight.gameObject.SetActive(value);
            rightTerrain.stitchingLeft.gameObject.SetActive(value);
            break;

        case StitchingCase.Right_Forward:
            rightTerrain.stitchingRight.gameObject.SetActive(value);
            forwardTerrain.stitchingRight.gameObject.SetActive(value);
            break;

        case StitchingCase.Forward_Left:
            forwardTerrain.stitchingLeft.gameObject.SetActive(value);
            leftTerrain.stitchingLeft.gameObject.SetActive(value);
            break;

        case StitchingCase.Left_Back:
            leftTerrain.stitchingRight.gameObject.SetActive(value);
            backTerrain.stitchingLeft.gameObject.SetActive(value);
            break;


        //下4
        case StitchingCase.Bottom_Forward:
            bottomTerrain.stitchingDown.gameObject.SetActive(value);
            forwardTerrain.stitchingUp.gameObject.SetActive(value);
            break;

        case StitchingCase.Bottom_Right:
            bottomTerrain.stitchingRight.gameObject.SetActive(value);
            rightTerrain.stitchingDown.gameObject.SetActive(value);
            break;

        case StitchingCase.Bottom_Back:
            bottomTerrain.stitchingUp.gameObject.SetActive(value);
            backTerrain.stitchingDown.gameObject.SetActive(value);
            break;

        case StitchingCase.Bottom_Left:
            bottomTerrain.stitchingLeft.gameObject.SetActive(value);
            leftTerrain.stitchingDown.gameObject.SetActive(value);
            break;
        }
    }