コード例 #1
0
 /// <summary>Invokes all the listeners to the specified <see cref="T:TaleWorlds.CampaignSystem.MbEvent`4}" />.</summary>
 /// <typeparam name="T1">The type of the first event argument.</typeparam>
 /// <typeparam name="T2">The type of the second event argument.</typeparam>
 /// <typeparam name="T3">The type of the third event argument.</typeparam>
 /// <typeparam name="T4">The type of the fourth event argument.</typeparam>
 /// <param name="instance">An instance of <see cref="T:TaleWorlds.CampaignSystem.MbEvent`4}" /> to call "Invoke" against.</param>
 /// <param name="arg1">Fist argument of the event.</param>
 /// <param name="arg2">Second argument of the event.</param>
 /// <param name="arg3">Third argument of the event.</param>
 /// <param name="arg4">Fourth argument of the event.</param>
 /// <remarks>
 /// This is accomplished by calling a delegate on the private method called "Invoke" of the <see cref="T:TaleWorlds.CampaignSystem.MbEvent`4}" />,
 /// which guarantees fast and native execution.
 /// </remarks>
 public static void Invoke <T1, T2, T3, T4>(this MbEvent <T1, T2, T3, T4> instance, T1 arg1, T2 arg2, T3 arg3, T4 arg4)
 {
     MbEvent4InvokeHandler <T1, T2, T3, T4> .Invoke(instance, arg1, arg2, arg3, arg4);
 }
コード例 #2
0
 internal void OnRelationShifted(Hero baseHero, Hero otherHero, SegmentalFractionalScore fractionalScore, string explanation)
 {
     MbEvent4InvokeHandler <Hero, Hero, SegmentalFractionalScore, string> .deInvoke(Instance._relationShifted, baseHero, otherHero, fractionalScore, explanation);
 }