Show / Hide Table of Contents

Class ThrowingSystem

Inheritance
System.Object
ThrowingSystem
Namespace: Content.Shared.Throwing
Assembly: Content.Shared.dll
Syntax
public sealed class ThrowingSystem : EntitySystem

Fields

| Improve this Doc View Source

FlyTime

The minimum amount of time an entity needs to be thrown before the timer can be run. Anything below this threshold never enters the air.

Declaration
public const float FlyTime = null
Field Value
Type Description
System.Single
| Improve this Doc View Source

PushbackDefault

Declaration
public const float PushbackDefault = null
Field Value
Type Description
System.Single
| Improve this Doc View Source

ThrowAngularImpulse

Declaration
public const float ThrowAngularImpulse = null
Field Value
Type Description
System.Single

Methods

| Improve this Doc View Source

TryThrow(EntityUid, EntityCoordinates, Single, Nullable<EntityUid>, Single, Boolean)

Declaration
public void TryThrow(EntityUid uid, EntityCoordinates coordinates, float strength = 1F, EntityUid? user = null, float pushbackRatio = null, bool playSound = true)
Parameters
Type Name Description
EntityUid uid
Robust.Shared.Map.EntityCoordinates coordinates
System.Single strength
System.Nullable<EntityUid> user
System.Single pushbackRatio
System.Boolean playSound
| Improve this Doc View Source

TryThrow(EntityUid, Vector2, PhysicsComponent, TransformComponent, EntityQuery<ProjectileComponent>, Single, Nullable<EntityUid>, Single, Boolean)

Tries to throw the entity if it has a physics component, otherwise does nothing.

Declaration
public void TryThrow(EntityUid uid, Vector2 direction, PhysicsComponent physics, TransformComponent transform, EntityQuery<ProjectileComponent> projectileQuery, float strength = 1F, EntityUid? user = null, float pushbackRatio = null, bool playSound = true)
Parameters
Type Name Description
EntityUid uid

The entity being thrown.

Vector2 direction

A vector pointing from the entity to its destination.

Robust.Shared.Physics.Components.PhysicsComponent physics
TransformComponent transform
EntityQuery<ProjectileComponent> projectileQuery
System.Single strength

How much the direction vector should be multiplied for velocity.

System.Nullable<EntityUid> user
System.Single pushbackRatio

The ratio of impulse applied to the thrower - defaults to 10 because otherwise it's not enough to properly recover from getting spaced

System.Boolean playSound
| Improve this Doc View Source

TryThrow(EntityUid, Vector2, Single, Nullable<EntityUid>, Single, Boolean)

Tries to throw the entity if it has a physics component, otherwise does nothing.

Declaration
public void TryThrow(EntityUid uid, Vector2 direction, float strength = 1F, EntityUid? user = null, float pushbackRatio = null, bool playSound = true)
Parameters
Type Name Description
EntityUid uid

The entity being thrown.

Vector2 direction

A vector pointing from the entity to its destination.

System.Single strength

How much the direction vector should be multiplied for velocity.

System.Nullable<EntityUid> user
System.Single pushbackRatio

The ratio of impulse applied to the thrower - defaults to 10 because otherwise it's not enough to properly recover from getting spaced

System.Boolean playSound
  • Improve this Doc
  • View Source
☀
☾
In This Article
Back to top
Generated by DocFX
☀
☾