Exemple #1
0
 protected void RemoveLastConditionEffect()
 {
     if (PlayerConditionState.Any())
     {
         PlayerConditionState.Remove(PlayerConditionState.ElementAt(PlayerConditionState.Count - 1));
     }
 }
Exemple #2
0
        protected void RemoveConditionEffect(ICondition condition)
        {
            if (!PlayerConditionState.Any())
            {
                Debug.Log(ErrorMessages.NoConditionToRemove);
                return;
            }

            var conditionToRemove = PlayerConditionState.ToList().SingleOrDefault(x => x.ActiveCondition == condition);

            if (conditionToRemove != default(PlayerConditionState))
            {
                PlayerConditionState.Remove(conditionToRemove);
            }
        }