예제 #1
0
    // =========================================================================



    // =========================================================================
    // METHODS UNITY -----------------------------------------------------------

    void Start()
    {
        Config = GameObject.FindWithTag("Config").GetComponent <Config> ();

        ScreenPosition = gameObject.GetComponent <GuiScreenPosition> ();

        if (Background)
        {
            BackgroundTrans = Background.transform;
        }

        if (Cam.aspect >= 1)
        {
            ScreenPosition.SetCameraAspect(Cam.rect.width / Cam.rect.height);
        }
        else
        {
            ScreenPosition.SetCameraAspect(Cam.rect.height / Cam.rect.width);
        }
    }
예제 #2
0
파일: Overview.cs 프로젝트: Jonas90/iss
    // =========================================================================
    // =========================================================================
    // METHODS UNITY -----------------------------------------------------------
    void Start()
    {
        Config = GameObject.FindWithTag ( "Config" ).GetComponent<Config> ();

        ScreenPosition = gameObject.GetComponent<GuiScreenPosition> ();

        if ( Background )
        {
            BackgroundTrans = Background.transform;
        }

        if ( Cam.aspect >= 1 )
        {
            ScreenPosition.SetCameraAspect ( Cam.rect.width/Cam.rect.height );
        }
        else
        {
            ScreenPosition.SetCameraAspect ( Cam.rect.height/Cam.rect.width );
        }
    }