* LaunchOnTriggerComponent Launches an object when a trigger on that object is caused. The launch will be a certain amount of force. The direction of the force will be in the direction the object is facing. * Fire stationary objects in the direction they're facing * EVIL * LESS EVIL * Resolve @ScarKy0 comments
15 lines
561 B
C#
15 lines
561 B
C#
using Robust.Shared.GameStates;
|
|
|
|
namespace Content.Shared.Trigger.Components.Effects;
|
|
|
|
/// <summary>
|
|
/// Launches the owner of this component when triggered.
|
|
/// If TargetUser is true, this launches the entity that was collided with instead (because the "user" is the thing that's caused the collision, i.e. the other object).
|
|
/// </summary>
|
|
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
|
|
public sealed partial class LaunchOnTriggerComponent : BaseXOnTriggerComponent
|
|
{
|
|
[DataField, AutoNetworkedField]
|
|
public float Speed = 10.0f;
|
|
}
|