logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class WeaponFiredSignal

    Signal dispatched after a weapon successfully fires (via TryFire).

    Inheritance
    object
    WeaponFiredSignal
    Namespace: Serenity.GameWeapon.Application.Events
    Assembly: Serenity.GameWeapon.Application.dll
    Syntax
    public class WeaponFiredSignal : EventDispatcherSignal

    Constructors

    WeaponFiredSignal()

    Initializes a new instance of the WeaponFiredSignal class.

    Declaration
    public WeaponFiredSignal()

    WeaponFiredSignal(string, int)

    Initializes a new instance of the WeaponFiredSignal class.

    Declaration
    public WeaponFiredSignal(string weaponId, int remainingAmmo)
    Parameters
    Type Name Description
    string weaponId

    The identity of the weapon that fired.

    int remainingAmmo

    The magazine's ammo count immediately after the shot.

    Fields

    RemainingAmmo

    The magazine's ammo count immediately after the shot.

    Declaration
    public readonly int RemainingAmmo
    Field Value
    Type Description
    int

    WeaponId

    The identity of the weapon that fired.

    Declaration
    public readonly string WeaponId
    Field Value
    Type Description
    string

    Methods

    ToString()

    Returns a string representation of the event.

    Declaration
    public override string ToString()
    Returns
    Type Description
    string
    In this article
    © 2026 Serenity. All Rights Reserved