A game about forced loneliness, made by TACStudios
1using System;
2using UnityEngine.UI;
3
4namespace Unity.VisualScripting
5{
6 /// <summary>
7 /// Called when the current value of the slider has changed.
8 /// </summary>
9 [UnitCategory("Events/GUI")]
10 [TypeIcon(typeof(Slider))]
11 [UnitOrder(8)]
12 public sealed class OnSliderValueChanged : GameObjectEventUnit<float>
13 {
14 public override Type MessageListenerType => typeof(UnityOnSliderValueChangedMessageListener);
15 protected override string hookName => EventHooks.OnSliderValueChanged;
16
17 /// <summary>
18 /// The new numeric value of the slider.
19 /// </summary>
20 [DoNotSerialize]
21 [PortLabelHidden]
22 public ValueOutput value { get; private set; }
23
24 protected override void Definition()
25 {
26 base.Definition();
27
28 value = ValueOutput<float>(nameof(value));
29 }
30
31 protected override void AssignArguments(Flow flow, float value)
32 {
33 flow.SetValue(this.value, value);
34 }
35 }
36}