コード例 #1
0
ファイル: BaseMode.events.cs プロジェクト: WLSF/SampSharp
 /// <summary>
 ///     Raises the <see cref="PlayerTakeDamage" /> event.
 /// </summary>
 /// <param name="player">The player triggering the event.</param>
 /// <param name="e">An <see cref="DamageEventArgs" /> that contains the event data. </param>
 protected virtual void OnPlayerTakeDamage(GtaPlayer player, DamageEventArgs e)
 {
     if (PlayerTakeDamage != null)
         PlayerTakeDamage(player, e);
 }
コード例 #2
0
ファイル: BaseMode.events.cs プロジェクト: Xalphox/SampSharp
 /// <summary>
 ///     Raises the <see cref="PlayerGiveDamage" /> event.
 /// </summary>
 /// <param name="player">The player triggering the event.</param>
 /// <param name="e">An <see cref="DamageEventArgs" /> that contains the event data. </param>
 protected virtual void OnPlayerGiveDamage(BasePlayer player, DamageEventArgs e)
 {
     PlayerGiveDamage?.Invoke(player, e);
 }
コード例 #3
0
ファイル: BaseMode.events.cs プロジェクト: WLSF/SampSharp
 /// <summary>
 ///     Raises the <see cref="PlayerGiveDamageActor" /> event.
 /// </summary>
 /// <param name="actor">The actor.</param>
 /// <param name="e">The <see cref="DamageEventArgs" /> instance containing the event data.</param>
 protected void OnPlayerGiveDamageActor(Actor actor, DamageEventArgs e)
 {
     if (PlayerGiveDamageActor != null)
         PlayerGiveDamageActor(actor, e);
 }
コード例 #4
0
ファイル: BaseMode.events.cs プロジェクト: Xalphox/SampSharp
 /// <summary>
 ///     Raises the <see cref="PlayerGiveDamageActor" /> event.
 /// </summary>
 /// <param name="actor">The actor.</param>
 /// <param name="e">The <see cref="DamageEventArgs" /> instance containing the event data.</param>
 protected void OnPlayerGiveDamageActor(Actor actor, DamageEventArgs e)
 {
     PlayerGiveDamageActor?.Invoke(actor, e);
 }