Family.FamilyName

From Intrigues Wiki
Revision as of 22:16, 4 January 2024 by Tayfunwiki (talk | contribs) (Created page with "== <code>FamilyName</code> Property in Family Class == === Overview === The <code>FamilyName</code> property in the Family class provides the name of a family, which is crucial for identifying and differentiating various families within a game, especially in narratives and game mechanics that emphasize family histories, alliances, and rivalries. === Property Definition === <syntaxhighlight lang="c#"> public string FamilyName { get; private set; } </syntaxhighlight> ==...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

FamilyName Property in Family Class

Overview

The FamilyName property in the Family class provides the name of a family, which is crucial for identifying and differentiating various families within a game, especially in narratives and game mechanics that emphasize family histories, alliances, and rivalries.

Property Definition

public string FamilyName { get; private set; }

Description

  • Property Type: string
  • Access: Read-only
  • Functionality: Retrieves the name of the family, which represents the family's identity within the game world.

Usage

This property is essential in games where family lineages and relationships are integral to the story or gameplay. It helps in tracking family-related events, decisions, and dynamics, and is key in scenarios involving family interactions, inheritances, or conflicts.

Example of Usage

public class FamilyInfoDisplay : MonoBehaviour {
    void Start() {
        Family playerFamily = IM.Player.Family;
        if (playerFamily != null) {
            Debug.Log($"Player's family name: {playerFamily.FamilyName}");
        }
    }
}

Description

  • This example shows how to access and display the player's family name in the console.
  • Knowing the FamilyName can be important for narrative contexts, quests, or interactions that involve the player's family.

Remarks

  • The FamilyName property is vital for building a rich narrative and creating a sense of belonging and identity for the player within the game's world.
  • It allows for storytelling elements that revolve around family legacies, honors, and disputes.