Exemplo n.º 1
0
 public void ApplyEffect(Effect effect)
 {
     if (effectManager != null)
     {
         effectManager.ApplyEffect(effect);
     }
 }
Exemplo n.º 2
0
 /// <summary>
 /// Consumes the effect.
 /// </summary>
 /// <param name="effectManager">Effect manager to apply the effect to.</param>
 void ConsumeEffect(EffectManager effectManager)
 {
     effectManager.ApplyEffect(_effect);
     Destroy(gameObject);
     OnConsumed?.Invoke(this, new System.EventArgs());
     Debug.Log(string.Format("effect {0} applied to {1}", _effect, effectManager));
 }
Exemplo n.º 3
0
 void Awake()
 {
     _effects = GetComponent <EffectManager>();
     _effects.Init(this);
     if (!_effects.HasEffect <EffectImpl.LandmarkWrapperEffect>())
     {
         _effects.ApplyEffect(new EffectImpl.LandmarkWrapperEffect());
     }
     _cardManager = GetComponent <CardManager>();
 }