```
feat(player): 添加玩家阵型保存功能 新增savedFormation字段用于存储玩家的阵型配置, 包括角色ID列表和对应的格子索引位置信息。 ```
This commit is contained in:
1 parent
e127da5416
commit
1abd0de32f
16 files changed
+432
-2930
No files matched your search
@@ -85,6 +85,14 @@ public class WaveSpawner : MonoBehaviour
|
||||
Vector3 spawnPos = transform.position + wave.spawnPositions[i];
|
||||
GameObject enemy = Instantiate(wave.enemyPrefabs[i], spawnPos, Quaternion.identity);
|
||||
enemy.tag = "Enemy";
|
||||
|
||||
// 增大敌人的寻敌距离
|
||||
UnitBase unitBase = enemy.GetComponent<UnitBase>();
|
||||
if (unitBase != null)
|
||||
{
|
||||
unitBase.detectionRange = 100f; // 从默认30增加到100
|
||||
}
|
||||
|
||||
activeEnemies.Add(enemy);
|
||||
|
||||
Debug.Log($"生成敌人:{enemy.name} 位置={spawnPos}");
|
||||
|
||||
Reference in new issue
Block a user