Class ReceivingGunSoundEventArgs
Contains all information before a player receive gun sound.
public class ReceivingGunSoundEventArgs : IDeniableEvent, IFirearmEvent, IItemEvent, IPlayerEvent, IExiledEvent
- Inheritance
-
ReceivingGunSoundEventArgs
- Implements
- Inherited Members
- Extension Methods
Constructors
ReceivingGunSoundEventArgs(ReferenceHub, Firearm, int, MixerChannel, float, float, Vector3, bool)
Initializes a new instance of the ReceivingGunSoundEventArgs class.
public ReceivingGunSoundEventArgs(ReferenceHub hub, Firearm firearm, int audioIndex, MixerChannel mixerChannel, float range, float pitch, Vector3 ownPos, bool isSenderVisible)
Parameters
hubReferenceHubThe referencehub who will receive gun sound.
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.
isSenderVisibleboolThe audio owner is visible for this player.
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 will receive gun sound.
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
Sender
Gets the player who owns the Firearm.
public Player Sender { get; }
Property Value
SenderPosition
Gets or sets the virtual origin point used(Only works when SenderVisible is false).
public Vector3 SenderPosition { get; set; }
Property Value
- Vector3
SenderVisible
Gets a value indicating whether Sender is visible for this player.
public bool SenderVisible { get; }