private void OnCharacterDefeated(CustomHealth customHealth)
        {
            if (charactersToBeDefeated.Contains(customHealth))
            {
                charactersToBeDefeated.Remove(customHealth);
            }

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

            if (charactersToBeDefeated.Count == allowedSurvivors)
            {
                CustomHealth.OnCharacterDefeated -= OnCharacterDefeated;
                flowchart.ExecuteBlock(blockName);
            }
        }