private static T ContractEffectField <T>(StrategiaStrategy strategy, Func <ContractEffect, T> func)
        {
            if (strategy == null)
            {
                return(default(T));
            }

            ContractEffect contractEffect = strategy.Effects.OfType <ContractEffect>().FirstOrDefault();

            if (contractEffect == null)
            {
                return(default(T));
            }

            return(func.Invoke(contractEffect));
        }
Exemplo n.º 2
0
 public void AddEffectQueue(ContractEffect contractEffect)
 {
     effectQueue.Add(contractEffect);
 }