} // 몬스터 생성 중지 private bool triggerCheck(Map.mapNode trigerObj, Score threatScore) { bool trigger = false; switch (trigerObj.type) { case "hunt": int huntedCount = 0; foreach (int huntedMonsterNumber in trigerObj.monsterList) { if (threatScore.killPoint.ContainsKey(huntedMonsterNumber)) { huntedCount += threatScore.killPoint[huntedMonsterNumber]; ThreatLabel.text += huntedMonsterNumber + ": (" + threatScore.killPoint[huntedMonsterNumber] + "/" + trigerObj.count + ") 사냥됨."; } else { return(false); } } if (huntedCount >= trigerObj.count) { trigger = true; } break; } return(trigger); } // 위협 조건하나가 성립됐는지 확인
IEnumerator regenCycle(Map.mapNode regenInfo) { while (true) { regen(regenInfo.monsterList); yield return(new WaitForSeconds(regenInfo.cycle)); } } // 몬스터를 설정 시간마다 생성함