コード例 #1
0
    void Start()
    {
        aspectRate = (float)aspect.x / aspect.y;
        _camera    = GetComponent <Camera>();

        JokerSetting jokerSetting = GameObject.Find("JOKER_SETTING").GetComponent <JokerSetting> ();

        this.aspect = jokerSetting.aspect;

        CreateBackgroundCamera();
        UpdateScreenRate();

        //enabled = false;
    }
コード例 #2
0
    public GuiScaler(GUIText guiText)
    {
        //画面サイズの設定状況によって、縦横比を変える
        JokerSetting jokerSetting = NovelSingleton.GameManager.jokerSetting;

        //縦長の場合入れ替える
        if (jokerSetting.aspect.x < jokerSetting.aspect.y)
        {
            float tmp = this.fixWidth;
            this.fixWidth  = this.fixHeight;
            this.fixHeight = tmp;
        }

        this.guiText = guiText;

        fixFontSize = this.guiText.fontSize;
        pixX        = this.guiText.pixelOffset.x;
        pixY        = this.guiText.pixelOffset.y;
    }