13 private ref ScriptInvoker m_OnFactionUpdate;
17 override protected void OnFactionChanged(
Faction previous,
Faction current)
19 if (m_OnFactionUpdate)
22 if (m_OnFactionChangedInvoker)
23 m_OnFactionChangedInvoker.Invoke(
this, previous, current);
29 void ClearAffiliatedFaction()
38 static void SetFaction(IEntity owner,
Faction faction)
40 if (!owner || !faction )
45 factionComponent.SetAffiliatedFaction(faction);
50 [
Obsolete(
"Use the SCR_FactionAffiliationComponent.GetOnFactionChanged invoker instead!")]
51 ScriptInvoker GetOnFactionUpdate()
53 if (!m_OnFactionUpdate)
54 m_OnFactionUpdate =
new ScriptInvoker();
55 return m_OnFactionUpdate;
62 if (!m_OnFactionChangedInvoker)
65 return m_OnFactionChangedInvoker;