Class WeaponSwitchedSignal
Signal dispatched when the arsenal switches the actively held weapon.
Namespace: Serenity.GameWeapon.Application.Events
Assembly: Serenity.GameWeapon.Application.dll
Syntax
public class WeaponSwitchedSignal : EventDispatcherSignal
Remarks
Dispatched by IGameWeaponService.CycleNextWeapon() and SetActiveWeapon(id) when the
active weapon actually changes. Not dispatched when cycling with fewer than two weapons in the
arsenal, or when the requested weapon is already the active one.
Constructors
WeaponSwitchedSignal()
Initializes a new instance of the WeaponSwitchedSignal class.
Declaration
public WeaponSwitchedSignal()
WeaponSwitchedSignal(string, string)
Initializes a new instance of the WeaponSwitchedSignal class.
Declaration
public WeaponSwitchedSignal(string previousWeaponId, string newWeaponId)
Parameters
| Type | Name | Description |
|---|---|---|
| string | previousWeaponId | The identity of the weapon that was previously held. |
| string | newWeaponId | The identity of the weapon that is now held. |
Fields
NewWeaponId
The identity of the weapon that is now held.
Declaration
public readonly string NewWeaponId
Field Value
| Type | Description |
|---|---|
| string |
PreviousWeaponId
The identity of the weapon that was previously held.
Declaration
public readonly string PreviousWeaponId
Field Value
| Type | Description |
|---|---|
| string |
Methods
ToString()
Returns a string representation of the event.
Declaration
public override string ToString()
Returns
| Type | Description |
|---|---|
| string |