using System.Collections; using System.Collections.Generic; using UnityEngine; using System; public class TreatAsDigimonClass : ICardEffect, ITreatAsDigimonEffect { Func PermanentCondition { get; set; } public void SetUpTreatAsDigimonClass(Func permanentCondition) { this.PermanentCondition = permanentCondition; } public bool IsDigimon(Permanent permanent) { if (PermanentCondition != null && permanent != null) { if (permanent.TopCard != null) { if (PermanentCondition(permanent)) { return true; } } } return false; } }