On Joint Break 3D#
Physics 3D / On Joint Break 3D
Description#
Executed when the Joint attached to the object breaks
Code#
using System;
using UnityEngine;
using VisualScript.Icons;
namespace VisualScript.Runtime
{
[Title("On Joint Break 3D")]
[Image(typeof(IconJoint), ColorTheme.Type.Lime, typeof(BadgeExplosion))]
[Description("Executed when the Joint attached to the object breaks")]
[Category("Physics 3D/Joint Break")]
[Serializable]
public class TriggerCoreJointBreak3D : TriggerHandleSourceBase<HandleOnJointBreak3D>
{
// PROPERTIES: ----------------------------------------------------------------------------
protected override string GetTitle(GameObject source) => $"{this.SourceName} Joint Break";
// OVERRIDE METHODS: ----------------------------------------------------------------------
protected override void OnTrigger(GameObject target)
{
using Args args = Args.Get(this.Component, target);
this.Run(args);
}
}
}