Exemple #1
0
    void ChangeScreenSize()
    {
        ScreenSizeType sizeType = GlobalVariable.GetScreenSizeType();

        switch (sizeType)
        {
        case ScreenSizeType.Cinema:
            BendQuadScreen.transform.localScale    = QuadScreenMaxSize;
            BendQuadScreen.transform.localPosition = CinemaSettings.GetInstance().ImaxQuadScreenPosition;
            break;

        case ScreenSizeType.Standard:
            BendQuadScreen.transform.localScale    = QuadScreenStandardSize;
            BendQuadScreen.transform.localPosition = new Vector3(0, 0.75f, 19.1f);
            break;

        case ScreenSizeType.MINI:
            BendQuadScreen.transform.localScale    = QuadScreenMinSize;
            BendQuadScreen.transform.localPosition = new Vector3(0, -0.34f, 19.1f);
            break;

        default:
            break;
        }
    }
    public void Show()
    {
        if (IsShow)
        {
            return;
        }

        IsShow = true;

        SetAllBtnUnselected();
        ScreenSizeType sizeType = GlobalVariable.GetScreenSizeType();

        switch (sizeType)
        {
        case ScreenSizeType.Cinema:
            CinemaBtn.SetSelected(true);
            break;

        case ScreenSizeType.Standard:
            StandardBtn.SetSelected(true);
            break;

        case ScreenSizeType.MINI:
            MINIBtn.SetSelected(true);
            break;

        default:
            break;
        }

        this.gameObject.SetActive(true);
    }