mirror of
https://github.com/Alex-Rachel/TEngine.git
synced 2025-08-14 16:51:28 +00:00
更新demo
更新demo
This commit is contained in:
@@ -377,7 +377,7 @@ namespace GameLogic
|
||||
private GridItemPool TryCreateItemPool(string itemPrefabName)
|
||||
{
|
||||
string resPath = itemPrefabName;
|
||||
GameObject go = GameModule.Resource.LoadAsset<GameObject>(resPath, _containerTrans);
|
||||
GameObject go = GameModule.Resource.LoadGameObject(resPath, parent: _containerTrans);
|
||||
if (go != null)
|
||||
{
|
||||
go.SetActive(false);
|
||||
|
@@ -669,7 +669,7 @@ namespace GameLogic
|
||||
private ItemPool TryCreateItemPool(string itemPrefabName)
|
||||
{
|
||||
string resPath = itemPrefabName;
|
||||
GameObject go = GameModule.Resource.LoadAsset<GameObject>(resPath, _containerTrans);
|
||||
GameObject go = GameModule.Resource.LoadGameObject(resPath, parent: _containerTrans);
|
||||
if (go != null)
|
||||
{
|
||||
go.SetActive(false);
|
||||
|
@@ -55,7 +55,7 @@ namespace GameLogic
|
||||
}
|
||||
}
|
||||
|
||||
public override void BindMemberProperty()
|
||||
protected override void BindMemberProperty()
|
||||
{
|
||||
m_selectNode = FindChild("SelectNode");
|
||||
m_noSelectNode = FindChild("NoSelectNode");
|
||||
|
@@ -86,7 +86,7 @@ namespace GameLogic
|
||||
{
|
||||
}
|
||||
|
||||
public override void RegisterEvent()
|
||||
protected override void RegisterEvent()
|
||||
{
|
||||
base.RegisterEvent();
|
||||
AddSelectEvt();
|
||||
|
@@ -30,19 +30,19 @@ namespace GameLogic
|
||||
/// </summary>
|
||||
public List<TItem> items => m_items;
|
||||
|
||||
public override void BindMemberProperty()
|
||||
protected override void BindMemberProperty()
|
||||
{
|
||||
base.BindMemberProperty();
|
||||
LoopRectView = rectTransform.GetComponent<LoopGridView>();
|
||||
}
|
||||
|
||||
public override void OnCreate()
|
||||
protected override void OnCreate()
|
||||
{
|
||||
base.OnCreate();
|
||||
LoopRectView.InitGridView(0, OnGetItemByIndex);
|
||||
}
|
||||
|
||||
public override void OnDestroy()
|
||||
protected override void OnDestroy()
|
||||
{
|
||||
base.OnDestroy();
|
||||
m_itemCache.Clear();
|
||||
|
@@ -10,13 +10,13 @@ namespace GameLogic
|
||||
|
||||
private GameFrameworkDictionary<int, T> m_itemCache = new GameFrameworkDictionary<int, T>();
|
||||
|
||||
public override void BindMemberProperty()
|
||||
protected override void BindMemberProperty()
|
||||
{
|
||||
base.BindMemberProperty();
|
||||
LoopRectView = this.rectTransform.GetComponent<LoopListView>();
|
||||
}
|
||||
|
||||
public override void OnDestroy()
|
||||
protected override void OnDestroy()
|
||||
{
|
||||
base.OnDestroy();
|
||||
m_itemCache.Clear();
|
||||
|
@@ -31,19 +31,19 @@ namespace GameLogic
|
||||
/// </summary>
|
||||
public List<TItem> items => m_items;
|
||||
|
||||
public override void BindMemberProperty()
|
||||
protected override void BindMemberProperty()
|
||||
{
|
||||
base.BindMemberProperty();
|
||||
LoopRectView = rectTransform.GetComponent<LoopListView>();
|
||||
}
|
||||
|
||||
public override void OnCreate()
|
||||
protected override void OnCreate()
|
||||
{
|
||||
base.OnCreate();
|
||||
LoopRectView.InitListView(0, OnGetItemByIndex);
|
||||
}
|
||||
|
||||
public override void OnDestroy()
|
||||
protected override void OnDestroy()
|
||||
{
|
||||
base.OnDestroy();
|
||||
m_itemCache.Clear();
|
||||
|
Reference in New Issue
Block a user