virtual public void Setup_AfterAdd(XML xml) { XML cxml = null; string str; str = xml.GetAttribute("group"); if (str != null) { group = parent.GetChildById(str) as GGroup; } cxml = xml.GetNode("gearDisplay"); if (cxml != null) { gearDisplay.Setup(cxml); } cxml = xml.GetNode("gearXY"); if (cxml != null) { gearXY.Setup(cxml); } cxml = xml.GetNode("gearSize"); if (cxml != null) { gearSize.Setup(cxml); } cxml = xml.GetNode("gearLook"); if (cxml != null) { gearLook.Setup(cxml); } }
void Start() { Application.targetFrameRate = 60; GRoot.inst.SetContentScaleFactor(1136, 640); Stage.inst.onKeyDown.Add(OnKeyDown); UIPackage.AddPackage("UI/Transition"); _mainView = UIPackage.CreateObject("Transition", "Main").asCom; _mainView.fairyBatching = true; _mainView.SetSize(GRoot.inst.width, GRoot.inst.height); _mainView.AddRelation(GRoot.inst, RelationType.Size); GRoot.inst.AddChild(_mainView); _btnGroup = _mainView.GetChild("g0").asGroup; _g1 = UIPackage.CreateObject("Transition", "BOSS").asCom; _g2 = UIPackage.CreateObject("Transition", "BOSS_SKILL").asCom; _g3 = UIPackage.CreateObject("Transition", "TRAP").asCom; _g4 = UIPackage.CreateObject("Transition", "GoodHit").asCom; _g5 = UIPackage.CreateObject("Transition", "PowerUp").asCom; _g5.GetTransition("t0").SetHook("play_num_now", __playNum); _mainView.GetChild("btn0").onClick.Add(() => { __play(_g1); }); _mainView.GetChild("btn1").onClick.Add(() => { __play(_g2); }); _mainView.GetChild("btn2").onClick.Add(() => { __play(_g3); }); _mainView.GetChild("btn3").onClick.Add(__play4); _mainView.GetChild("btn4").onClick.Add(__play5); }
static int SetBoundsChangedFlag(IntPtr L) { try { int count = LuaDLL.lua_gettop(L); if (count == 1) { FairyGUI.GGroup obj = (FairyGUI.GGroup)ToLua.CheckObject <FairyGUI.GGroup>(L, 1); obj.SetBoundsChangedFlag(); return(0); } else if (count == 2) { FairyGUI.GGroup obj = (FairyGUI.GGroup)ToLua.CheckObject <FairyGUI.GGroup>(L, 1); bool arg0 = LuaDLL.luaL_checkboolean(L, 2); obj.SetBoundsChangedFlag(arg0); return(0); } else { return(LuaDLL.luaL_throw(L, "invalid arguments to method: FairyGUI.GGroup.SetBoundsChangedFlag")); } } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
static public int UpdateBounds(IntPtr l) { try { FairyGUI.GGroup self = (FairyGUI.GGroup)checkSelf(l); self.UpdateBounds(); pushValue(l, true); return(1); } catch (Exception e) { return(error(l, e)); } }
static public int constructor(IntPtr l) { try { FairyGUI.GGroup o; o = new FairyGUI.GGroup(); pushValue(l, true); pushValue(l, o); return(2); } catch (Exception e) { return(error(l, e)); } }
static int UpdateBounds(IntPtr L) { try { ToLua.CheckArgsCount(L, 1); FairyGUI.GGroup obj = (FairyGUI.GGroup)ToLua.CheckObject(L, 1, typeof(FairyGUI.GGroup)); obj.UpdateBounds(); return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
static int EnsureBoundsCorrect(IntPtr L) { try { ToLua.CheckArgsCount(L, 1); FairyGUI.GGroup obj = (FairyGUI.GGroup)ToLua.CheckObject <FairyGUI.GGroup>(L, 1); obj.EnsureBoundsCorrect(); return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
/// <summary> /// Returns a child object belong to a group with a certain name. /// </summary> /// <param name="group">A group object</param> /// <param name="name">Name</param> /// <returns>A child object. Null if not found.</returns> public GObject GetChildInGroup(GGroup group, string name) { int cnt = _children.Count; for (int i = 0; i < cnt; ++i) { GObject child = _children[i]; if (child.group == group && child.name == name) { return(child); } } return(null); }
static int Setup_BeforeAdd(IntPtr L) { try { ToLua.CheckArgsCount(L, 2); FairyGUI.GGroup obj = (FairyGUI.GGroup)ToLua.CheckObject <FairyGUI.GGroup>(L, 1); FairyGUI.Utils.XML arg0 = (FairyGUI.Utils.XML)ToLua.CheckObject <FairyGUI.Utils.XML>(L, 2); obj.Setup_BeforeAdd(arg0); return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
static int SetBoundsChangedFlag(IntPtr L) { try { ToLua.CheckArgsCount(L, 2); FairyGUI.GGroup obj = (FairyGUI.GGroup)ToLua.CheckObject <FairyGUI.GGroup>(L, 1); bool arg0 = LuaDLL.luaL_checkboolean(L, 2); obj.SetBoundsChangedFlag(arg0); return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
static int Setup_BeforeAdd(IntPtr L) { try { ToLua.CheckArgsCount(L, 3); FairyGUI.GGroup obj = (FairyGUI.GGroup)ToLua.CheckObject <FairyGUI.GGroup>(L, 1); FairyGUI.Utils.ByteBuffer arg0 = (FairyGUI.Utils.ByteBuffer)ToLua.CheckObject <FairyGUI.Utils.ByteBuffer>(L, 2); int arg1 = (int)LuaDLL.luaL_checknumber(L, 3); obj.Setup_BeforeAdd(arg0, arg1); return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
static int set_layout(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); FairyGUI.GGroup obj = (FairyGUI.GGroup)o; FairyGUI.GroupLayoutType arg0 = (FairyGUI.GroupLayoutType)ToLua.CheckObject(L, 2, typeof(FairyGUI.GroupLayoutType)); obj.layout = arg0; return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e, o, "attempt to index layout on a nil value")); } }
static int get_columnGap(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); FairyGUI.GGroup obj = (FairyGUI.GGroup)o; int ret = obj.columnGap; LuaDLL.lua_pushinteger(L, ret); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e, o, "attempt to index columnGap on a nil value")); } }
static int get_layout(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); FairyGUI.GGroup obj = (FairyGUI.GGroup)o; FairyGUI.GroupLayoutType ret = obj.layout; ToLua.Push(L, ret); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e, o, "attempt to index layout on a nil value")); } }
static int get_autoSizeDisabled(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); FairyGUI.GGroup obj = (FairyGUI.GGroup)o; bool ret = obj.autoSizeDisabled; LuaDLL.lua_pushboolean(L, ret); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e, o, "attempt to index autoSizeDisabled on a nil value")); } }
static int set_columnGap(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); FairyGUI.GGroup obj = (FairyGUI.GGroup)o; int arg0 = (int)LuaDLL.luaL_checknumber(L, 2); obj.columnGap = arg0; return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e, o, "attempt to index columnGap on a nil value")); } }
static int set_excludeInvisibles(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); FairyGUI.GGroup obj = (FairyGUI.GGroup)o; bool arg0 = LuaDLL.luaL_checkboolean(L, 2); obj.excludeInvisibles = arg0; return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e, o, "attempt to index excludeInvisibles on a nil value")); } }
static int set_autoSizeDisabled(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); FairyGUI.GGroup obj = (FairyGUI.GGroup)o; bool arg0 = LuaDLL.luaL_checkboolean(L, 2); obj.autoSizeDisabled = arg0; return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e, o, "attempt to index autoSizeDisabled on a nil value")); } }
static int GetChildInGroup(IntPtr L) { try { ToLua.CheckArgsCount(L, 3); FairyGUI.GComponent obj = (FairyGUI.GComponent)ToLua.CheckObject(L, 1, typeof(FairyGUI.GComponent)); FairyGUI.GGroup arg0 = (FairyGUI.GGroup)ToLua.CheckObject(L, 2, typeof(FairyGUI.GGroup)); string arg1 = ToLua.CheckString(L, 3); FairyGUI.GObject o = obj.GetChildInGroup(arg0, arg1); ToLua.PushObject(L, o); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
static int get_excludeInvisibles(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); FairyGUI.GGroup obj = (FairyGUI.GGroup)o; bool ret = obj.excludeInvisibles; LuaDLL.lua_pushboolean(L, ret); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e, o, "attempt to index excludeInvisibles on a nil value")); } }
void Start() { Application.targetFrameRate = 60; Stage.inst.onKeyDown.Add(OnKeyDown); _mainView = this.GetComponent<UIPanel>().ui; _btnGroup = _mainView.GetChild("g0").asGroup; _g1 = UIPackage.CreateObject("Transition", "BOSS").asCom; _g2 = UIPackage.CreateObject("Transition", "BOSS_SKILL").asCom; _g3 = UIPackage.CreateObject("Transition", "TRAP").asCom; _g4 = UIPackage.CreateObject("Transition", "GoodHit").asCom; _g5 = UIPackage.CreateObject("Transition", "PowerUp").asCom; _g5.GetTransition("t0").SetHook("play_num_now", __playNum); _mainView.GetChild("btn0").onClick.Add(() => { __play(_g1); }); _mainView.GetChild("btn1").onClick.Add(() => { __play(_g2); }); _mainView.GetChild("btn2").onClick.Add(() => { __play(_g3); }); _mainView.GetChild("btn3").onClick.Add(__play4); _mainView.GetChild("btn4").onClick.Add(__play5); }
static int _CreateFairyGUI_GGroup(IntPtr L) { try { int count = LuaDLL.lua_gettop(L); if (count == 0) { FairyGUI.GGroup obj = new FairyGUI.GGroup(); ToLua.PushObject(L, obj); return(1); } else { return(LuaDLL.luaL_throw(L, "invalid arguments to ctor method: FairyGUI.GGroup.New")); } } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
public virtual void Setup_AfterAdd(XML xml) { XML cxml = null; string str; str = xml.GetAttribute("group"); if (str != null) group = parent.GetChildById(str) as GGroup; cxml = xml.GetNode("gearDisplay"); if (cxml != null) gearDisplay.Setup(cxml); cxml = xml.GetNode("gearXY"); if (cxml != null) gearXY.Setup(cxml); cxml = xml.GetNode("gearSize"); if (cxml != null) gearSize.Setup(cxml); cxml = xml.GetNode("gearLook"); if (cxml != null) gearLook.Setup(cxml); }
public virtual void Setup_AfterAdd(XML xml) { string str; str = xml.GetAttribute("group"); if (str != null) group = parent.GetChildById(str) as GGroup; XMLList.Enumerator et = xml.GetEnumerator(); XML cxml; int index; while (et.MoveNext()) { cxml = et.Current; if (GearXMLKeys.TryGetValue(cxml.name, out index)) GetGear(index).Setup(cxml); } }
public GObject GetChildInGroup(GGroup group, string name) { int cnt = _children.Count; for (int i = 0; i < cnt; ++i) { GObject child = _children[i]; if (child.group == group && child.name == name) return child; } return null; }