Description
The MaxRepeatTime
property of the BaseSoundComponent
class specifies the maximum time interval, in seconds, between repeated sound events. This property is used in conjunction with the MinRepeatTime
property to define a range for randomizing the repeat interval of a sound. It is part of the "Repeat" group of properties, which control the behavior of sound repetition.
Usage
To use the MaxRepeatTime
property, assign a floating-point value representing the maximum time in seconds you want between sound repetitions. Ensure that this value is greater than or equal to the MinRepeatTime
to avoid logical errors.
Example
// Example of setting the MaxRepeatTime property
BaseSoundComponent soundComponent = new BaseSoundComponent();
soundComponent.MaxRepeatTime = 5.0f; // Sets the maximum repeat time to 5 seconds