mirror of
https://github.com/Ottermandias/Glamourer.git
synced 2025-12-30 12:23:42 +01:00
32 lines
905 B
C#
32 lines
905 B
C#
using System;
|
|
using Glamourer.Interop.Structs;
|
|
using OtterGui.Classes;
|
|
|
|
namespace Glamourer.Events;
|
|
|
|
/// <summary>
|
|
/// Triggered when the visibility of weapons is changed.
|
|
/// <list type="number">
|
|
/// <item>Parameter is the actor with changed weapon visibility. </item>
|
|
/// <item>Parameter is the new state. </item>
|
|
/// </list>
|
|
/// </summary>
|
|
public sealed class WeaponVisibilityChanged : EventWrapper<Action<Actor, Ref<bool>>, WeaponVisibilityChanged.Priority>
|
|
{
|
|
public enum Priority
|
|
{
|
|
/// <seealso cref="State.StateListener.OnWeaponVisibilityChange"/>
|
|
StateListener = 0,
|
|
}
|
|
|
|
public WeaponVisibilityChanged()
|
|
: base(nameof(WeaponVisibilityChanged))
|
|
{ }
|
|
|
|
public void Invoke(Actor actor, ref bool state)
|
|
{
|
|
var value = new Ref<bool>(state);
|
|
Invoke(this, actor, value);
|
|
state = value;
|
|
}
|
|
}
|