/// <summary> /// Constructor which lets you provide a dialogue option and relationship to automatically bind to. /// </summary> /// <param name="option"> /// The dialogue option which, when triggered by a visitor, will apply the batch. /// </param> /// <param name="relationship">The relationship that will be modified.</param> /// <param name="applyMultiple"> /// Whether the batch may be applied more than once for the same dialogue option. /// </param> public RelationshipChange(DialogueOption option, Relationship relationship, bool applyMultiple = false) { rel = relationship; opt = option; applymulti = applyMultiple; chooseevent = new EventHandler<EventArgs>(opt_OptionChosen); opt.OptionChosen += chooseevent; }
/// <summary> /// "Introduces" the person to someone else, creating a new relationship /// and populating it with the other person's qualities. /// </summary> /// <param name="p">The person to introduce</param> /// <returns>A new relationship</returns> public Relationship Introduce(Person p) { Relationship r = new Relationship(this, p); relationships.Add(r); return r; }
public RelationshipChangeEventArgs(Relationship r) { this.Relationship = r; }
/// <summary> /// Applies a batch. /// </summary> /// <param name="target">The relationship that the batch should be applied to.</param> public void Apply(Relationship target) { if (Applied != null) Applied(this, new RelationshipChangeEventArgs(target)); }