protected void RemoveLastConditionEffect() { if (PlayerConditionState.Any()) { PlayerConditionState.Remove(PlayerConditionState.ElementAt(PlayerConditionState.Count - 1)); } }
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); } }