Class CharacterAttackSignal
Signal dispatched when a character performs an attack. Contains generic attack data: the attacker's identity and whether the attack connected with its target. Specialized character types (e.g., Character) can extend this signal to add type-specific payload fields.
Namespace: Serenity.Character.Application.Events
Assembly: Serenity.Character.Application.dll
Syntax
public class CharacterAttackSignal : EventDispatcherSignal
Constructors
CharacterAttackSignal(CharacterId, bool)
Creates a new CharacterAttackSignal.
Declaration
public CharacterAttackSignal(CharacterId characterId, bool didHitPlayer)
Parameters
| Type | Name | Description |
|---|---|---|
| CharacterId | characterId | The identity of the attacking character. |
| bool | didHitPlayer | True if the attack connected with the player. |
Fields
CharacterId
The identity of the attacking character.
Declaration
public readonly CharacterId CharacterId
Field Value
| Type | Description |
|---|---|
| CharacterId |
DidHitPlayer
True if the attack hit the player.
Declaration
public readonly bool DidHitPlayer
Field Value
| Type | Description |
|---|---|
| bool |