Nephews

From Intrigues Wiki
Revision as of 13:48, 21 December 2023 by Tayfunwiki (talk | contribs) (Created page with "== <code>Nephews</code> Method in Actor Class == === Overview === The <code>Nephews</code> method in the <code>Actor</code> class is designed to retrieve the nephews of an actor. This method provides the option to include or exclude deceased nephews based on the specified parameter. === Syntax === <syntaxhighlight lang="c#"> public IEnumerable<Actor> Nephews(bool inclusivePassive = true) </syntaxhighlight> === Parameters === * <code>inclusivePassive</code> (bool): A...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Nephews Method in Actor Class

Overview

The Nephews method in the Actor class is designed to retrieve the nephews of an actor. This method provides the option to include or exclude deceased nephews based on the specified parameter.

Syntax

public IEnumerable<Actor> Nephews(bool inclusivePassive = true)

Parameters

  • inclusivePassive (bool): A flag that indicates whether to include deceased (passive state) nephews in the returned collection. The default value is true.

Returns

  • Return Type: IEnumerable<Actor>. This method returns a collection of Actor objects, each representing a nephew of the actor.
  • When inclusivePassive is set to true, the collection includes all nephews, alive or deceased.
  • When inclusivePassive is set to false, it includes only living (active state) nephews.

Description

The Nephews method allows access to the actor's nephews, with an option to include those who have passed away, depending on the inclusivePassive parameter. This method is useful in games where extended family relationships are significant.

Usage

This method can be particularly important in game narratives or mechanics where relationships with extended family members, like nephews, play a key role, such as in storylines involving family legacies, conflicts, or alliances.

Example:

var allNephews = someActor.Nephews();
var livingNephews = someActor.Nephews(false);

In these examples, allNephews includes both living and deceased nephews, while livingNephews includes only the living ones.

Remarks

  • The ability to include or exclude deceased nephews provides a realistic and comprehensive view of the actor's familial relationships.
  • Such functionality is crucial for accurately depicting complex family dynamics and their impact on the game's narrative and character interactions.
  • The method enhances the depth of the game's world, allowing for more nuanced and detailed storytelling.