private void Reset() { e = (Tapestry_Effect)ScriptableObject.CreateInstance("Tapestry_Effect"); e.payload = new Tapestry_EffectBuilder_Payload_Damage(); d = new Tapestry_EffectBuilder_Payload_Damage(); //e.name = "buttfarts"; }
public virtual void AddEffect(Tapestry_Effect effect) { if (effect.canBeStacked || !effects.Contains(effect)) { effects.Add(effect); } }
public virtual void RemoveEffectByName(Tapestry_Effect effect) { for (int i = effects.Count - 1; i >= 0; i--) { if (effect.displayName == effects[i].displayName) { effects.RemoveAt(i); break; } } }
public virtual void RemoveEffect(Tapestry_Effect effect) { for (int i = effects.Count - 1; i >= 0; i--) { if (effect.Equals(effects[i])) { effects.RemoveAt(i); break; } } }
public bool Equals(Tapestry_Effect other) { bool comp = true; comp = comp & (displayName == other.displayName); comp = comp & (duration == other.duration); comp = comp & (sprite == other.sprite); comp = comp & (hideEffectDisplay == other.hideEffectDisplay); comp = comp & (canBeStacked == other.canBeStacked); comp = comp & (payload.GetType() == other.payload.GetType()); return(true); }
private void HandleEffects() { for (int i = effects.Count - 1; i >= 0; i--) { Tapestry_Effect e = effects[i]; e.Apply(this); if (e.readyForRemoval)//if (e.duration == Tapestry_EffectBuilder_Duration.Instant) { effects.Remove(e); } } }
public override void Apply(Tapestry_Actor target) { for (int i = target.effects.Count - 1; i >= 0; i--) { Tapestry_Effect e = target.effects[i]; if (e.payload.GetType() != typeof(Tapestry_EffectBuilder_Payload_Purge)) { if (needsOneKeyword) { if (e.keywords.ContainsOne(keywords)) { e.readyForRemoval = true; } } else { if (e.keywords.ContainsAll(keywords)) { e.readyForRemoval = true; } } } } }
private void Reset() { effect = (Tapestry_Effect)ScriptableObject.CreateInstance("Tapestry_Effect"); keywords = (Tapestry_KeywordRegistry)ScriptableObject.CreateInstance("Tapestry_KeywordRegistry"); }
public Tapestry_Effect Clone() { Tapestry_Effect export = (Tapestry_Effect)this.MemberwiseClone(); return(export); }