mengyao生成修改

This commit is contained in:
wulongxiao 2025-01-06 15:39:19 +08:00
parent 6ecc3a3ed2
commit 59234a2201
3 changed files with 26 additions and 16 deletions

View File

@ -5986,35 +5986,31 @@ MonoBehaviour:
mengyaoItems:
- id: M_T_002
imge: {fileID: 0}
cardimge: {fileID: 0}
cardimge: {fileID: 21300000, guid: 948b21abbed4a124bbe3d02caa37f317, type: 3}
prefab: {fileID: 8433650275485930554, guid: 0e629856be1575e4a9258394dee87cc7, type: 3}
- id: M_H_002
imge: {fileID: 0}
cardimge: {fileID: 0}
prefab: {fileID: 8433650275485930554, guid: b23a54d617796b04d832ddf0cd85a319, type: 3}
- id: M_J_001
imge: {fileID: 0}
cardimge: {fileID: 0}
cardimge: {fileID: 21300000, guid: df5f98317f7ecb54bac7b97052a8d2dc, type: 3}
prefab: {fileID: 8433650275485930554, guid: 1e8a70ff26520dd4a8744ae2156d16d3, type: 3}
- id: M_H_001
imge: {fileID: 0}
cardimge: {fileID: 0}
cardimge: {fileID: 21300000, guid: 492e5984b518a80458cf575c0b57335c, type: 3}
prefab: {fileID: 8433650275485930554, guid: 67d13a9263159eb49993b8cc68eb3785, type: 3}
- id: M_M_001
imge: {fileID: 0}
cardimge: {fileID: 0}
cardimge: {fileID: 21300000, guid: 5e3fd295650deeb4fa3395de2d789b8a, type: 3}
prefab: {fileID: 8433650275485930554, guid: 4f81cc16b1203d549b927ed7da53fdbf, type: 3}
- id: M_M_002
imge: {fileID: 0}
cardimge: {fileID: 0}
cardimge: {fileID: 21300000, guid: d6cae85a1dbf95e48a035af3e65d974f, type: 3}
prefab: {fileID: 8433650275485930554, guid: b7a992fcbbc242e4eb0b83eea3bfab81, type: 3}
- id: M_S_001
imge: {fileID: 0}
cardimge: {fileID: 0}
cardimge: {fileID: 21300000, guid: a95e23a2fb1de5b429b428575fc6d229, type: 3}
prefab: {fileID: 8433650275485930554, guid: 1ce7ba2999a588840be40787ac4fb7fc, type: 3}
- id: M_S_002
imge: {fileID: 0}
cardimge: {fileID: 0}
cardimge: {fileID: 21300000, guid: 8e7daa6a68986b944aae00387aabf4ea, type: 3}
prefab: {fileID: 8433650275485930554, guid: 71d5f6e53fdb1674aae2e6fa1acf423d, type: 3}
instane: {fileID: 0}
--- !u!114 &1910338487

View File

@ -14,12 +14,26 @@ public class mengyaoInfo
public class MY_Infos : MonoBehaviour
{
public List<mengyaoInfo> mengyaoItems=new List<mengyaoInfo>();
public Dictionary<string, mengyaoInfo> mengyaoItemsDic=new Dictionary<string, mengyaoInfo>();
public MY_Infos instane;
void Awake()
{
instane = this;
foreach (mengyaoInfo value in mengyaoItems)
{
mengyaoItemsDic.Add(value.id,value);
}
}
public mengyaoInfo GetMY(string id)
{
mengyaoInfo temp=null;
mengyaoItemsDic.TryGetValue(id,out temp);
return temp;
}
}

View File

@ -1,7 +1,7 @@
using System.Collections.Generic;
using UnityEngine;
using System.Collections;
using System.Threading.Tasks;
using UnityEngine.Rendering;
public class SpawnMonster : Base
@ -42,12 +42,12 @@ public class SpawnMonster : Base
}
/*public void UpdateNodeList()
public void UpdateNodeList()
{
// 获取所有带有 SortingGroup 组件的敌人对象
List<GameObject> gameObjectsList = new List<GameObject>();
foreach (GameObject go in Enemys)
foreach (GameObject go in enemysList)
{
// 获取该物体上的 SortingGroup 组件
if (go != null)
@ -83,13 +83,13 @@ public class SpawnMonster : Base
}
}
}
}*/
}
void Update()
{
// UpdateNodeList();
UpdateNodeList();
}