feat(player): 添加玩家阵型保存功能

新增savedFormation字段用于存储玩家的阵型配置,
包括角色ID列表和对应的格子索引位置信息。
```
This commit is contained in:
huadexuan committed 2026-09-29 23:21:44 +08:00
1 parent e127da5416
commit 1abd0de32f
16 files changed
+432 -2930

No files matched your search

@@ -114,6 +114,14 @@ public class DefenseWaveLevelController : MonoBehaviour
: (spawned % 2 == 0 ? -3f : 3f);
var enemy = Instantiate(prefab, new Vector3(x, spawnY, spawnZ), Quaternion.identity);
enemy.tag = "Enemy";
// 增大敌人的寻敌距离
UnitBase unitBase = enemy.GetComponent<UnitBase>();
if (unitBase != null)
{
unitBase.detectionRange = 100f; // 从默认30增加到100
}
ApplyCharacterData(enemy, wave.enemyIds[typeIndex]);
activeEnemies.Add(enemy);
spawned++;