コード例 #1
0
        public IEnumerator ApplyEffects(EffectTrigger trigger, Player.Player player)
        {
            foreach (var effect in GetEffects(trigger))
            {
                Debug.Log(NameId + " " + effect.name);
                yield return(effect.ApplyEffect(player));

                yield return(new WaitForSeconds(0.5f));
            }
        }
コード例 #2
0
 private List <Effect> GetEffects(EffectTrigger trigger)
 {
     return(_isNeutralised
         ? new List <Effect>()
         : _data.EffectData.Where(e => e.Trigger == trigger).SelectMany(e => e.Effect).ToList());
 }