using System.Numerics; using Robust.Shared.GameStates; namespace Content.Shared._DV.Waddle; /// /// Defines something as having a waddle animation when it moves. /// [RegisterComponent, NetworkedComponent, Access(typeof(SharedWaddleAnimationSystem), typeof(WaddleClothingSystem))] [AutoGenerateComponentState(true, true)] public sealed partial class WaddleAnimationComponent : Component { /// /// What's the name of this animation? Make sure it's unique so it can play along side other animations. /// This prevents someone accidentally causing two identical waddling effects to play on someone at the same time. /// [DataField] public string KeyName = "Waddle"; /// /// How high should they hop during the waddle? Higher hop = more energy. /// [DataField, AutoNetworkedField] public Vector2 HopIntensity = new(0, 0.25f); /// /// How far should they rock backward and forward during the waddle? /// Each step will alternate between this being a positive and negative rotation. More rock = more scary. /// [DataField, AutoNetworkedField] public float TumbleIntensity = 20.0f; /// /// How long should a complete step take? Less time = more chaos. /// [DataField, AutoNetworkedField] public TimeSpan AnimationLength = TimeSpan.FromSeconds(0.66f); /// /// How much shorter should the animation be when running? /// [DataField, AutoNetworkedField] public float RunAnimationLengthMultiplier = 0.568f; /// /// Stores which step we made last, so if someone cancels out of the animation mid-step then restarts it looks more natural. /// Only used on the client /// public bool LastStep; /// /// Stores if we're currently waddling so we can start/stop as appropriate and can tell other systems our state. /// [DataField, AutoNetworkedField] public bool IsWaddling; }