FairyGUI.GRoot.DisplayObjectToGObject C# (CSharp) Method

DisplayObjectToGObject() public method

public DisplayObjectToGObject ( DisplayObject obj ) : GObject
obj DisplayObject
return GObject
        public GObject DisplayObjectToGObject(DisplayObject obj)
        {
            while (obj != null)
            {
                if (obj.gOwner != null)
                    return obj.gOwner;

                obj = obj.parent;
            }
            return null;
        }

Usage Example

示例#1
0
 static public int DisplayObjectToGObject(IntPtr l)
 {
     try {
         FairyGUI.GRoot         self = (FairyGUI.GRoot)checkSelf(l);
         FairyGUI.DisplayObject a1;
         checkType(l, 2, out a1);
         var ret = self.DisplayObjectToGObject(a1);
         pushValue(l, true);
         pushValue(l, ret);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
All Usage Examples Of FairyGUI.GRoot::DisplayObjectToGObject