static int GetJoyStick_ro(IntPtr L) { try { ToLua.CheckArgsCount(L, 2); UIBase obj = (UIBase)ToLua.CheckObject(L, 1, typeof(UIBase)); string arg0 = ToLua.CheckString(L, 2); UGUIJoyStickBase o = obj.GetJoyStick_ro(arg0); ToLua.Push(L, o); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
public UGUIJoyStickBase GetJoyStick_ro(string name) { if (m_joySticks_ro.ContainsKey(name)) { return(m_joySticks_ro[name]); } UGUIJoyStickBase tmp = GetGameObject(name).GetComponent <UGUIJoyStickBase>(); if (tmp == null) { throw new Exception(m_EventNames + " GetJoyStick_ro ->" + name + "<- is Null !"); } m_joySticks_ro.Add(name, tmp); return(tmp); }