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