// Token: 0x06015A54 RID: 88660 RVA: 0x00582580 File Offset: 0x00580780 public override bool InitPlayerContext() { TypeDNName typeDNName = new TypeDNName("BlackJack.ProjectL.PlayerContext.ProjectLPlayerContext"); this.m_playerContext = (ClassLoader.Instance.CreateInstance(typeDNName, new object[0]) as PlayerContextBase); return(this.m_playerContext != null); }
public static int get_m_typeFullName(IntPtr l) { int result; try { TypeDNName typeDNName = (TypeDNName)LuaObject.checkSelf(l); LuaObject.pushValue(l, true); LuaObject.pushValue(l, typeDNName.m_typeFullName); result = 2; } catch (Exception e) { result = LuaObject.error(l, e); } return(result); }
public static int set_m_assemblyName(IntPtr l) { int result; try { TypeDNName typeDNName = (TypeDNName)LuaObject.checkSelf(l); string assemblyName; LuaObject.checkType(l, 2, out assemblyName); typeDNName.m_assemblyName = assemblyName; LuaObject.pushValue(l, true); result = 1; } catch (Exception e) { result = LuaObject.error(l, e); } return(result); }
public static int constructor(IntPtr l) { int result; try { string typeDNName; LuaObject.checkType(l, 2, out typeDNName); TypeDNName o = new TypeDNName(typeDNName); LuaObject.pushValue(l, true); LuaObject.pushValue(l, o); result = 2; } catch (Exception e) { result = LuaObject.error(l, e); } return(result); }
// Token: 0x06000564 RID: 1380 RVA: 0x00017DE0 File Offset: 0x00015FE0 public static PrefabControllerBase AddControllerToGameObject(GameObject root, string path, TypeDNName ctrlTypeDNName, string ctrlName, string luaModuleName = null, bool autoBind = false) { Type type = ClassLoader.Instance.LoadType(ctrlTypeDNName); if (type == null) { global::Debug.LogError(string.Format("AddControllerToGameObject fail for {0}", ctrlTypeDNName.m_typeFullName)); return(null); } int num = path.IndexOf('/'); if (num == -1) { if (!root.name.Contains(path)) { global::Debug.LogError(string.Format("AddControllerToGameObject fail path error {0}", path)); return(null); } PrefabControllerBase prefabControllerBase = root.GetComponent(type) as PrefabControllerBase; if (prefabControllerBase != null) { return(prefabControllerBase); } root.GetComponent(type); prefabControllerBase = (root.AddComponent(type) as PrefabControllerBase); if (prefabControllerBase != null) { if (type.IsDefined(typeof(HotFixManuallyAttribute), false) && !string.IsNullOrEmpty(luaModuleName)) { LuaManager.TryInitHotfixForObj(prefabControllerBase, luaModuleName, null); } prefabControllerBase.Initlize(ctrlName, autoBind); } return(prefabControllerBase); } else { string name = path.Substring(num + 1); Transform transform = root.transform.Find(name); if (transform == null) { global::Debug.LogError(string.Format("AddControllerToGameObject fail path error {0}", path)); return(null); } GameObject gameObject = transform.gameObject; PrefabControllerBase prefabControllerBase = gameObject.GetComponent(type) as PrefabControllerBase; if (prefabControllerBase != null) { return(prefabControllerBase); } prefabControllerBase = (gameObject.AddComponent(type) as PrefabControllerBase); if (prefabControllerBase != null) { prefabControllerBase.Initlize(ctrlName, autoBind); } return(prefabControllerBase); } }