Class SendingGunSoundEventArgs
Contains all information before a gun sound is sent to players.
public class SendingGunSoundEventArgs : IDeniableEvent, IFirearmEvent, IItemEvent, IPlayerEvent, IExiledEvent
- Inheritance
-
SendingGunSoundEventArgs
- Implements
- Inherited Members
- Extension Methods
Constructors
SendingGunSoundEventArgs(Firearm, int, MixerChannel, float, float, Vector3)
Initializes a new instance of the SendingGunSoundEventArgs class.
public SendingGunSoundEventArgs(Firearm firearm, int audioIndex, MixerChannel mixerChannel, float range, float pitch, Vector3 ownPos)
Parameters
firearmFirearmThe internal firearm instance.
audioIndexintThe index of the audio clip to be played.
mixerChannelMixerChannelThe audio mixer channel.
rangefloatThe audible range of the sound.
pitchfloatThe pitch of the sound.
ownPosVector3The audio owner position.
Properties
AudioIndex
Gets or sets the index of the audio clip to be played from the firearm's audio list.
public int AudioIndex { get; set; }
Property Value
Firearm
Gets the firearm that was the source of the sound.
public Firearm Firearm { get; }
Property Value
IsAllowed
Gets or sets a value indicating whether the gun sound should be sent.
public bool IsAllowed { get; set; }
Property Value
Item
Gets the Item triggering the event.
public Item Item { get; }
Property Value
MixerChannel
Gets or sets the mixer channel through which the sound will be played.
public MixerChannel MixerChannel { get; set; }
Property Value
- MixerChannel
Pitch
Gets or sets the pitch of the gun sound.
public float Pitch { get; set; }
Property Value
Player
Gets the player who owns the Firearm.
public Player Player { get; }
Property Value
Range
Gets or sets the max audible distance of the gun sound.
public float Range { get; set; }
Property Value
SendingPosition
Gets or sets the virtual origin point used(Only will work when this player not visible for sending player).
public Vector3 SendingPosition { get; set; }
Property Value
- Vector3