using System; using System.Collections.Generic; using Robust.Shared.Maths; using Robust.Shared.Physics; using Robust.Shared.Physics.Dynamics; using Robust.Shared.Physics.Dynamics.Joints; using Robust.Shared.Serialization; namespace Robust.Shared.GameObjects { [Serializable, NetSerializable] public class PhysicsComponentState : ComponentState { public readonly bool CanCollide; public readonly bool SleepingAllowed; public readonly bool FixedRotation; public readonly BodyStatus Status; public readonly List Fixtures; public readonly List Joints; public readonly Vector2 LinearVelocity; public readonly float AngularVelocity; public readonly BodyType BodyType; /// /// /// /// /// /// /// /// /// /// Current linear velocity of the entity in meters per second. /// Current angular velocity of the entity in radians per sec. /// public PhysicsComponentState( bool canCollide, bool sleepingAllowed, bool fixedRotation, BodyStatus status, List fixtures, List joints, Vector2 linearVelocity, float angularVelocity, BodyType bodyType) : base(NetIDs.PHYSICS) { CanCollide = canCollide; SleepingAllowed = sleepingAllowed; FixedRotation = fixedRotation; Status = status; Fixtures = fixtures; Joints = joints; LinearVelocity = linearVelocity; AngularVelocity = angularVelocity; BodyType = bodyType; } } }