private void Die() { foreach (var quest in quests.quests) { if (quest.isActive && quest.questGoal.goalType == GoalType.Kill) { quest.questGoal.EnemyKilled(); if (quest.questGoal.IsReached()) { quests.QuestCompleted(quest.name); } } } isAbleToSpawn.SetValue(true); quests.restCharges--; gameObject.SetActive(false); }
private void Start() { StartCoroutine(StartSpawning()); isAbleToSpawn.SetValue(true); }