using System.Collections; using System.Collections.Generic; using UnityEngine; using System; public class CanNotDigivolveClass : ICardEffect, ICanNotDigivolveEffect { Func _PermanentCondition { get; set; } Func _CardCondition { get; set; } public void SetUpCanNotEvolveClass(Func permanentCondition, Func cardCondition) { _PermanentCondition = permanentCondition; _CardCondition = cardCondition; } public bool CanNotEvolve(Permanent permanent, CardSource cardSource) { if (permanent != null && cardSource != null) { if (permanent.TopCard != null) { if (_PermanentCondition != null && _CardCondition != null) { if (_PermanentCondition(permanent) && _CardCondition(cardSource)) { return true; } } } } return false; } }