The TemporaryEffect class is responsible for destroying a GameObject after a specified number of seconds. If the GameObject or its children have any components that implement ITemporaryEffect
, the destruction will be delayed until those effects are completed. This is particularly useful for ensuring that sounds or particles have finished before the GameObject is removed.