2020-10-10 15:25:13 +02:00
|
|
|
|
using Robust.Shared.GameObjects;
|
|
|
|
|
|
using Robust.Shared.Serialization;
|
|
|
|
|
|
|
|
|
|
|
|
namespace Content.Shared.GameObjects.Components.Body.Part.Property
|
|
|
|
|
|
{
|
2020-11-15 04:22:59 +01:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Defines the speed at which a <see cref="IBodyPart"/> can move.
|
|
|
|
|
|
/// </summary>
|
2020-10-10 15:25:13 +02:00
|
|
|
|
[RegisterComponent]
|
|
|
|
|
|
public class LegComponent : BodyPartPropertyComponent
|
|
|
|
|
|
{
|
|
|
|
|
|
public override string Name => "Leg";
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
2020-11-15 04:22:59 +01:00
|
|
|
|
/// Speed in tiles per second.
|
2020-10-10 15:25:13 +02:00
|
|
|
|
/// </summary>
|
|
|
|
|
|
public float Speed { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
public override void ExposeData(ObjectSerializer serializer)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.ExposeData(serializer);
|
|
|
|
|
|
|
|
|
|
|
|
serializer.DataField(this, l => l.Speed, "speed", 2.6f);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|