コード例 #1
0
 void ApplyEffect(
     PersistentHealthEffect effect,
     Dictionary <string, PersistentHealthEffect> effectMap,
     FoldableHealthEffectEvent beginEvent,
     FoldableHealthEffectEvent procEvent,
     FoldableHealthEffectEvent endEvent
     )
 {
     if (effectMap.ContainsKey(effect.Key))
     {
         RemoveEffect(effect.Key, effectMap, endEvent);
     }
     effectMap.Add(effect.Key, effect);
     beginEvent.Invoke(this, effect, effect.EffectBeginFunc(this));
     effect.EffectCoroutineHandle = EffectCoroutine(effect, effectMap, procEvent, endEvent);
     StartCoroutine(effect.EffectCoroutineHandle);
 }