using System.Collections.Generic; using UnityEngine; using UnityEngine.Serialization; namespace Game { public partial class LevelNodeMonsterWave : LevelNode, ILevelMonsterWave { [Rename("攻击周期(秒)")] public float attackRound; [Rename("攻击频率(秒/次)")] public float attackFrequency; [Rename("攻击次数")] public int attackTimes; [Rename("近战人数")] public int attackerMelee; [Rename("远程人数")] public int attackerLongRange; private int _waveIndex; private LevelNodeMonster[] _monsterList; private readonly Dictionary _numAttackerDict = new Dictionary(); public override void OnInit() { _monsterList = GetComponentsInChildren(); for (EAIModuleType i = 0; i < EAIModuleType.Max; i++) { _numAttackerDict[i] = 0; } _numAttackerDict[EAIModuleType.Melee] = attackerMelee; _numAttackerDict[EAIModuleType.LongRange] = attackerLongRange; } public LevelNodeMonster[] GetMonsters() { return _monsterList; } public void SetWaveIndex(int index) { _waveIndex = index; } public int GetWaveIndex() { return _waveIndex; } } }