use manual component state for BaseEmitSoundComponent (#35030)

* why

* cursed
This commit is contained in:
Milon
2025-03-30 15:41:11 +02:00
committed by GitHub
parent 47f8aefc25
commit 89e59b391d
13 changed files with 75 additions and 30 deletions

View File

@@ -11,13 +11,12 @@ public sealed partial class EmitSoundOnCollideComponent : BaseEmitSoundComponent
/// <summary>
/// Minimum velocity required for the sound to play.
/// </summary>
[ViewVariables(VVAccess.ReadWrite), DataField("minVelocity")]
[DataField("minVelocity")]
public float MinimumVelocity = 3f;
/// <summary>
/// To avoid sound spam add a cooldown to it.
/// </summary>
[ViewVariables(VVAccess.ReadWrite), DataField("nextSound", customTypeSerializer: typeof(TimeOffsetSerializer))]
[AutoPausedField]
[DataField(customTypeSerializer: typeof(TimeOffsetSerializer)), AutoPausedField]
public TimeSpan NextSound;
}