2024-07-27 14:26:45 +00:00
|
|
|
namespace PkmnLib.Dynamic.Events;
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Allows for the batching of multiple events that should be shown at the same time.
|
|
|
|
/// </summary>
|
|
|
|
/// <remarks>
|
|
|
|
/// This is useful for when we send multiple events to the client in sequence, but we want to show them in one go.
|
|
|
|
/// For example, when a Pokemon gets hurt by poison, we want to show the purple poison animation and the damage at the
|
|
|
|
/// same time. This is done by batching the events together.
|
|
|
|
/// </remarks>
|
2025-01-10 12:45:29 +00:00
|
|
|
public readonly record struct EventBatchId
|
2024-07-27 14:26:45 +00:00
|
|
|
{
|
2025-01-10 12:45:29 +00:00
|
|
|
public EventBatchId()
|
|
|
|
{
|
|
|
|
Id = Guid.NewGuid();
|
|
|
|
}
|
2025-03-02 16:19:57 +00:00
|
|
|
|
2024-07-27 14:26:45 +00:00
|
|
|
/// <summary>
|
|
|
|
/// The unique identifier for this batch of events.
|
|
|
|
/// </summary>
|
2025-01-10 12:45:29 +00:00
|
|
|
public Guid Id { get; init; }
|
2024-07-27 14:26:45 +00:00
|
|
|
}
|