コード例 #1
0
 public Rect getScreenBoundsAA()
 {
     if (_screenBounds.x == -1f)
     {
         // here I suppose this game object has attached a GUICustomElement
         _screenBounds = GUIScreenLayoutManager.positionInScreen(GetComponent <GUICustomElement>());
     }
     return(_screenBounds);
 }
コード例 #2
0
ファイル: OptionQuit.cs プロジェクト: memsyi/marioBadClone
    public Rect getScreenBoundsAA()
    {
        // This method called only once if the gameobject is a non destroyable game object

        // if used with a Unity's GUITexture
        if (guiTexture != null)
        {
            return(guiTexture.GetScreenRect(Camera.main));
        }
        // here I suppose this game object has attached a GUICustomElement
        else
        {
            return(GUIScreenLayoutManager.positionInScreen(GetComponent <GUICustomElement>()));
        }
    }