static int CreatGameObjectByPool(IntPtr L) { try { int count = LuaDLL.lua_gettop(L); if (count == 3 && TypeChecker.CheckTypes(L, 1, typeof(UnityEngine.GameObject), typeof(UnityEngine.GameObject), typeof(bool))) { UnityEngine.GameObject arg0 = (UnityEngine.GameObject)ToLua.ToObject(L, 1); UnityEngine.GameObject arg1 = (UnityEngine.GameObject)ToLua.ToObject(L, 2); bool arg2 = LuaDLL.lua_toboolean(L, 3); UnityEngine.GameObject o = GameObjectManager.CreatGameObjectByPool(arg0, arg1, arg2); ToLua.Push(L, o); return(1); } else if (count == 3 && TypeChecker.CheckTypes(L, 1, typeof(string), typeof(UnityEngine.GameObject), typeof(bool))) { string arg0 = ToLua.ToString(L, 1); UnityEngine.GameObject arg1 = (UnityEngine.GameObject)ToLua.ToObject(L, 2); bool arg2 = LuaDLL.lua_toboolean(L, 3); UnityEngine.GameObject o = GameObjectManager.CreatGameObjectByPool(arg0, arg1, arg2); ToLua.Push(L, o); return(1); } else { return(LuaDLL.luaL_throw(L, "invalid arguments to method: GameObjectManager.CreatGameObjectByPool")); } } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
public override void OnEnterStatus() { GameObjectManager.CreatGameObjectByPool("gogo"); //ConfigManager.GetData("adasda")["qqq"].GetString(); Debug.Log("hello"); }
public virtual void OnCompleteEnterAnim() { //AnimSystem.Move(gameObject, Vector3.zero, Vector3.one, 0.5f, isLocal: false); GameObject go = GameObjectManager.CreatGameObjectByPool("go"); GameObjectManager.DestroyGameobjectByPool(go); }
public FightWindow ui_fightWindow; //战斗界面 #endregion // Use this for initialization void Start() { go_player = GameObjectManager.CreatGameObjectByPool("Player", c_assetPath_player, true); go_player.transform.position = v3_startPoint; comp_playerMove = go_player.GetComponent <PlayerMove>(); go_mainCamera = GameObject.Find("Main Camera"); comp_cameraFollow = GetComponent <CameraFollow>(); comp_cameraFollow.Tran_FollowTarget = go_player.transform; //Timer.DelayPlay(2, ShowFightWindow); }
public UIBase CreateItem(string itemName, string prantName) { GameObject item = GameObjectManager.CreatGameObjectByPool(itemName, GetGameObject(prantName), true); UIBase UIItem = item.GetComponent <UIBase>(); UIItem.Init(m_childUIIndex++); UIItem.UIName = UIEventKey + UIItem.UIName; m_ChildList.Add(UIItem); return(UIItem); }
public UIBase CreateItem(string itemName, string prantName) { GameObject item = GameObjectManager.CreatGameObjectByPool(itemName, GetGameObject(prantName), true); item.transform.localScale = Vector3.one; UIBase UIItem = item.GetComponent <UIBase>(); if (UIItem == null) { throw new Exception("CreateItem Error : ->" + itemName + "<- don't have UIBase Component!"); } UIItem.Init(m_childUIIndex++); UIItem.UIName = UIEventKey + UIItem.UIName; m_ChildList.Add(UIItem); return(UIItem); }
ReusingScrollItemBase GetItem() { ReusingScrollItemBase result = null; if (m_itemCatchs.Count > 0) { result = m_itemCatchs[0]; result.gameObject.SetActive(true); m_itemCatchs.RemoveAt(0); m_items.Add(result); return(result); } result = GameObjectManager.CreatGameObjectByPool(m_itemPrefab).GetComponent <ReusingScrollItemBase>(); result.Init(); m_items.Add(result); return(result); }
public override void OnEnterStatus() { Debug.Log("DPI :" + Screen.dpi + " FontSize" + GUIUtil.FontSize); InputOperationEventProxy.LoadEventCreater <CustomEvent>(); InputManager.AddListener <CustomEvent>(OnEventCallBack); GameObject go = GameObjectManager.CreatGameObjectByPool("gogo"); go.transform.position = new Vector3(0, 0, 300); go.transform.localScale = new Vector3(100, 100, 100); UIManager.OpenUIWindow <testWindow>(); AnimSystem.Move(go, null, new Vector3(0, 0, 600), time: 1, repeatType: RepeatType.PingPang); AnimSystem.Move(go, null, Vector3.one, callBack: (object[] obj) => { } , parameter: new object[] { }); }
public override void OnEnterStatus() { Debug.Log("DPI :" + Screen.dpi + " FontSize" + GUIUtil.FontSize); InputOperationEventProxy.LoadEventCreater <CustomEvent>(); InputManager.AddListener <CustomEvent>(OnEventCallBack); GameObject go = GameObjectManager.CreatGameObjectByPool("gogo"); go.transform.position = new Vector3(0, 0, 300); go.transform.localScale = new Vector3(100, 100, 100); UIManager.OpenUIWindow <testWindow>(); AnimSystem.Move(go, null, new Vector3(0, 0, 600), time: 1, repeatType: RepeatType.PingPang); //ConfigManager.GetData("adasda")["qqq"].GetString(); Debug.Log("hello"); //InputManager.LoadDispatcher(typeof(InputNetworkEvent).Name); ////InputManager.LoadDispatcher<InputNetworkEvent>(); //InputNetworkEvent e = new InputNetworkEvent(); //InputManager.AddListener<InputNetworkEvent>(e.EventKey, CallBackTest); //////InputManager.re //InputManager.Dispatch<InputNetworkEvent>(e); AnimSystem.Move(go, null, Vector3.one, callBack: (object[] obj) => { } , parameter: new object[] { }); }