//具体产怪方法 private void InstantiateEnemy() { if (currEnemyIDIndex < enemyIdList.Count) { enemyBuilder.EnemyId = enemyIdList[currEnemyIDIndex]; enemyBuilder.enemyPathList = level.roundList[level.currentRound].info.pathList; enemyBuilder.GetProduct(); } currEnemyIDIndex++; if (currEnemyIDIndex >= enemyIdList.Count) { //StopCreateEnemy(); isNeedCreateEnemy = false; timeCreatEnemy = 1;//下次产怪 开关一开就产怪 } }