<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://www.wlabsocks.com/wiki/index.php?action=history&amp;feed=atom&amp;title=OnJoinedFamily</id>
	<title>OnJoinedFamily - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://www.wlabsocks.com/wiki/index.php?action=history&amp;feed=atom&amp;title=OnJoinedFamily"/>
	<link rel="alternate" type="text/html" href="http://www.wlabsocks.com/wiki/index.php?title=OnJoinedFamily&amp;action=history"/>
	<updated>2026-05-13T04:36:26Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.5</generator>
	<entry>
		<id>http://www.wlabsocks.com/wiki/index.php?title=OnJoinedFamily&amp;diff=786&amp;oldid=prev</id>
		<title>Tayfunwiki: Created page with &quot;== &lt;code&gt;onJoinedFamily&lt;/code&gt; Event in Actor Class ==  === Overview === The &lt;code&gt;onJoinedFamily&lt;/code&gt; event in the &lt;code&gt;Actor&lt;/code&gt; class is activated when the actor becomes a member of a family. This event is crucial in games where family dynamics significantly influence character development, gameplay mechanics, and the unfolding of the narrative.  === Description ===  * Event Type: &lt;code&gt;Action&lt;Family&gt;&lt;/code&gt; * Functionality: The event is triggered when an actor...&quot;</title>
		<link rel="alternate" type="text/html" href="http://www.wlabsocks.com/wiki/index.php?title=OnJoinedFamily&amp;diff=786&amp;oldid=prev"/>
		<updated>2023-12-24T20:03:17Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;== &amp;lt;code&amp;gt;onJoinedFamily&amp;lt;/code&amp;gt; Event in Actor Class ==  === Overview === The &amp;lt;code&amp;gt;onJoinedFamily&amp;lt;/code&amp;gt; event in the &amp;lt;code&amp;gt;Actor&amp;lt;/code&amp;gt; class is activated when the actor becomes a member of a family. This event is crucial in games where family dynamics significantly influence character development, gameplay mechanics, and the unfolding of the narrative.  === Description ===  * Event Type: &amp;lt;code&amp;gt;Action&amp;lt;Family&amp;gt;&amp;lt;/code&amp;gt; * Functionality: The event is triggered when an actor...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== &amp;lt;code&amp;gt;onJoinedFamily&amp;lt;/code&amp;gt; Event in Actor Class ==&lt;br /&gt;
&lt;br /&gt;
=== Overview ===&lt;br /&gt;
The &amp;lt;code&amp;gt;onJoinedFamily&amp;lt;/code&amp;gt; event in the &amp;lt;code&amp;gt;Actor&amp;lt;/code&amp;gt; class is activated when the actor becomes a member of a family. This event is crucial in games where family dynamics significantly influence character development, gameplay mechanics, and the unfolding of the narrative.&lt;br /&gt;
&lt;br /&gt;
=== Description ===&lt;br /&gt;
&lt;br /&gt;
* Event Type: &amp;lt;code&amp;gt;Action&amp;lt;Family&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
* Functionality: The event is triggered when an actor joins a family. It provides the &amp;lt;code&amp;gt;Family&amp;lt;/code&amp;gt; object representing the family joined. This setup enables specific actions or logic to be implemented in response to the actor's new family affiliation.&lt;br /&gt;
&lt;br /&gt;
=== Usage ===&lt;br /&gt;
The event is typically used to trigger updates or custom actions within the game when an actor's family status changes. This can involve adjusting character roles, updating story elements, or changing interaction dynamics to reflect the new family membership.&lt;br /&gt;
&lt;br /&gt;
=== Subscribing to the Event ===&lt;br /&gt;
To handle changes in an actor's family status, a method with the signature &amp;lt;code&amp;gt;Action&amp;lt;Family&amp;gt;&amp;lt;/code&amp;gt; should be subscribed to the &amp;lt;code&amp;gt;onJoinedFamily&amp;lt;/code&amp;gt; event. Proper unsubscribing from the event is essential for optimal game performance and to prevent memory leaks.&lt;br /&gt;
&lt;br /&gt;
=== Example of Usage ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c#&amp;quot;&amp;gt;&lt;br /&gt;
public class FamilyJoinHandler : MonoBehaviour {&lt;br /&gt;
    public Actor actor;&lt;br /&gt;
&lt;br /&gt;
    void Start() {&lt;br /&gt;
        if (actor != null) {&lt;br /&gt;
            actor.onJoinedFamily += OnJoinedFamily;&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    private void OnJoinedFamily(Family newFamily) {&lt;br /&gt;
        Debug.Log($&amp;quot;{actor.FullName} has joined the family: {newFamily.FamilyName}.&amp;quot;);&lt;br /&gt;
        // Implement logic to handle the actor's new family affiliation&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    void OnDestroy() {&lt;br /&gt;
        if (actor != null) {&lt;br /&gt;
            actor.onJoinedFamily -= OnJoinedFamily;&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;In this Unity script example, the &amp;lt;code&amp;gt;FamilyJoinHandler&amp;lt;/code&amp;gt; is attached to a GameObject and subscribes to the &amp;lt;code&amp;gt;onJoinedFamily&amp;lt;/code&amp;gt; event of an &amp;lt;code&amp;gt;Actor&amp;lt;/code&amp;gt;. When the actor joins a new family, the &amp;lt;code&amp;gt;OnJoinedFamily&amp;lt;/code&amp;gt; method is called, enabling the game to respond appropriately to the new family connection.&lt;br /&gt;
&lt;br /&gt;
=== Remarks ===&lt;br /&gt;
&lt;br /&gt;
* The &amp;lt;code&amp;gt;onJoinedFamily&amp;lt;/code&amp;gt; event is essential for creating dynamic and engaging gameplay experiences, particularly in titles where family relationships play a key role.&lt;br /&gt;
* Handling this event effectively can add depth and richness to the game narrative, offering a more immersive and contextually rich environment.&lt;br /&gt;
* This event is especially relevant in role-playing games, simulation games, and other narrative-driven games where family affiliations and dynamics are central to character development and story progression.&lt;/div&gt;</summary>
		<author><name>Tayfunwiki</name></author>
	</entry>
</feed>