A game about forced loneliness, made by TACStudios
1using System; 2 3namespace Unity.VisualScripting 4{ 5 /// <summary> 6 /// Called when a joint attached to the same game object broke. 7 /// </summary> 8 [UnitCategory("Events/Physics")] 9 public sealed class OnJointBreak : GameObjectEventUnit<float> 10 { 11 public override Type MessageListenerType => typeof(UnityOnJointBreakMessageListener); 12 protected override string hookName => EventHooks.OnJointBreak; 13 14 /// <summary> 15 /// The force that was applied for this joint to break. 16 /// </summary> 17 [DoNotSerialize] 18 public ValueOutput breakForce { get; private set; } 19 20 protected override void Definition() 21 { 22 base.Definition(); 23 24 breakForce = ValueOutput<float>(nameof(breakForce)); 25 } 26 27 protected override void AssignArguments(Flow flow, float breakForce) 28 { 29 flow.SetValue(this.breakForce, breakForce); 30 } 31 } 32}