<?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=OnLeftClan</id>
	<title>OnLeftClan - 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=OnLeftClan"/>
	<link rel="alternate" type="text/html" href="http://www.wlabsocks.com/wiki/index.php?title=OnLeftClan&amp;action=history"/>
	<updated>2026-05-12T23:27:09Z</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=OnLeftClan&amp;diff=785&amp;oldid=prev</id>
		<title>Tayfunwiki: Created page with &quot;== &lt;code&gt;onLeftClan&lt;/code&gt; Event in Actor Class ==  === Overview === The &lt;code&gt;onLeftClan&lt;/code&gt; event within the &lt;code&gt;Actor&lt;/code&gt; class is triggered when the actor leaves a clan. This event is essential in games where clan dynamics and affiliations play a significant role in shaping character relationships, gameplay mechanics, and narrative development.  === Description ===  * Event Type: &lt;code&gt;Action&lt;Clan&gt;&lt;/code&gt; * Functionality: This event is activated when an actor...&quot;</title>
		<link rel="alternate" type="text/html" href="http://www.wlabsocks.com/wiki/index.php?title=OnLeftClan&amp;diff=785&amp;oldid=prev"/>
		<updated>2023-12-24T19:57:32Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;== &amp;lt;code&amp;gt;onLeftClan&amp;lt;/code&amp;gt; Event in Actor Class ==  === Overview === The &amp;lt;code&amp;gt;onLeftClan&amp;lt;/code&amp;gt; event within the &amp;lt;code&amp;gt;Actor&amp;lt;/code&amp;gt; class is triggered when the actor leaves a clan. This event is essential in games where clan dynamics and affiliations play a significant role in shaping character relationships, gameplay mechanics, and narrative development.  === Description ===  * Event Type: &amp;lt;code&amp;gt;Action&amp;lt;Clan&amp;gt;&amp;lt;/code&amp;gt; * Functionality: This event is activated 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;onLeftClan&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;onLeftClan&amp;lt;/code&amp;gt; event within the &amp;lt;code&amp;gt;Actor&amp;lt;/code&amp;gt; class is triggered when the actor leaves a clan. This event is essential in games where clan dynamics and affiliations play a significant role in shaping character relationships, gameplay mechanics, and narrative development.&lt;br /&gt;
&lt;br /&gt;
=== Description ===&lt;br /&gt;
&lt;br /&gt;
* Event Type: &amp;lt;code&amp;gt;Action&amp;lt;Clan&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
* Functionality: This event is activated when an actor exits a clan. The event handler is passed the &amp;lt;code&amp;gt;Clan&amp;lt;/code&amp;gt; object representing the clan left by the actor. It provides a framework for executing specific actions or logic in response to the actor's departure from a clan.&lt;br /&gt;
&lt;br /&gt;
=== Usage ===&lt;br /&gt;
The event is employed to trigger certain actions or updates in the game when an actor leaves a clan. This could include redefining the actor's role, updating story elements, or modifying gameplay options to align with the new clan-less status of the actor.&lt;br /&gt;
&lt;br /&gt;
=== Subscribing to the Event ===&lt;br /&gt;
To effectively handle the &amp;lt;code&amp;gt;onLeftClan&amp;lt;/code&amp;gt; event, subscribe a method with the corresponding signature (&amp;lt;code&amp;gt;Action&amp;lt;Clan&amp;gt;&amp;lt;/code&amp;gt;) in a MonoBehaviour script. Unsubscribing from the event is crucial to avoid memory leaks and ensure appropriate game behavior.&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 ClanLeaveHandler : 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.onLeftClan += OnLeftClan;&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    private void OnLeftClan(Clan oldClan) {&lt;br /&gt;
        Debug.Log($&amp;quot;{actor.FullName} has left the clan: {oldClan.ClanName}.&amp;quot;);&lt;br /&gt;
        // Logic to respond to the actor's departure from the clan&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    void OnDestroy() {&lt;br /&gt;
        if (actor != null) {&lt;br /&gt;
            actor.onLeftClan -= OnLeftClan;&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;In this Unity script, the &amp;lt;code&amp;gt;ClanLeaveHandler&amp;lt;/code&amp;gt; is attached to a GameObject and listens for the &amp;lt;code&amp;gt;onLeftClan&amp;lt;/code&amp;gt; event of an &amp;lt;code&amp;gt;Actor&amp;lt;/code&amp;gt;. When the actor leaves a clan, the &amp;lt;code&amp;gt;OnLeftClan&amp;lt;/code&amp;gt; method is invoked, allowing the game to adapt to the change in the actor's clan affiliation.&lt;br /&gt;
&lt;br /&gt;
=== Remarks ===&lt;br /&gt;
&lt;br /&gt;
* The &amp;lt;code&amp;gt;onLeftClan&amp;lt;/code&amp;gt; event plays a pivotal role in maintaining dynamic and responsive clan dynamics within the game, reflecting changes in character allegiances.&lt;br /&gt;
* Proper management of this event can significantly impact the narrative and gameplay, adapting to the evolving landscape of clan relationships.&lt;br /&gt;
* This event is particularly relevant in games where clan membership influences character abilities, story progression, and player interactions.&lt;/div&gt;</summary>
		<author><name>Tayfunwiki</name></author>
	</entry>
</feed>