A game about forced loneliness, made by TACStudios
1using System.ComponentModel; 2 3namespace Unity.VisualScripting 4{ 5 /// <summary> 6 /// Called when a UnityEvent points to TriggerUnityEvent. 7 /// </summary> 8 [UnitCategory("Events")] 9 [UnitTitle("UnityEvent")] 10 [UnitOrder(2)] 11 [DisplayName("Visual Scripting Unity Event")] 12 public sealed class BoltUnityEvent : MachineEventUnit<string> 13 { 14 protected override string hookName => EventHooks.UnityEvent; 15 16 /// <summary> 17 /// The name of the event. The event will only trigger if this value 18 /// is equal to the string parameter passed in the UnityEvent. 19 /// </summary> 20 [DoNotSerialize] 21 [PortLabelHidden] 22 public ValueInput name { get; private set; } 23 24 protected override void Definition() 25 { 26 base.Definition(); 27 28 name = ValueInput(nameof(name), string.Empty); 29 } 30 31 protected override bool ShouldTrigger(Flow flow, string name) 32 { 33 return CompareNames(flow, this.name, name); 34 } 35 } 36}