private void OnCharacterDefeated(CustomHealth customHealth) { if (charactersToBeDefeated.Contains(customHealth)) { charactersToBeDefeated.Remove(customHealth); } if (charactersToBeDefeated.Count == 0) { flowchart.ExecuteBlock(blockName); } }
private void OnCharacterDefeated(CustomHealth customHealth) { if (charactersToBeDefeated.Contains(customHealth)) { charactersToBeDefeated.Remove(customHealth); } if (charactersToBeDefeated.Count == allowedSurvivors) { CustomHealth.OnCharacterDefeated -= OnCharacterDefeated; flowchart.ExecuteBlock(blockName); } }