Example #1
0
 /// <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;
 }
Example #2
0
 /// <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;
 }
Example #3
0
 public RelationshipChangeEventArgs(Relationship r)
 {
     this.Relationship = r;
 }
Example #4
0
 /// <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));
 }