Class TogglingFlashlightEventArgs
Contains all information before a player toggles a flashlight.
public class TogglingFlashlightEventArgs : IDeniableEvent, IItemEvent, IPlayerEvent, IExiledEvent
- Inheritance
-
TogglingFlashlightEventArgs
- Implements
- Inherited Members
- Extension Methods
Constructors
TogglingFlashlightEventArgs(ReferenceHub, ToggleableLightItemBase, bool)
Initializes a new instance of the TogglingFlashlightEventArgs class.
public TogglingFlashlightEventArgs(ReferenceHub hub, ToggleableLightItemBase flashlight, bool newState)
Parameters
hub
ReferenceHubflashlight
ToggleableLightItemBasenewState
bool
Properties
Flashlight
Gets the Flashlight being toggled.
public Flashlight Flashlight { get; }
Property Value
IsAllowed
Gets or sets a value indicating whether the player can toggle the flashlight.
public bool IsAllowed { get; set; }
Property Value
Item
Gets the Item triggering the event.
public Item Item { get; }
Property Value
NewState
Gets or sets a value indicating whether the flashlight should be on.
public bool NewState { get; set; }
Property Value
Player
Gets the player who's toggling the flashlight.
public Player Player { get; }