Skip to content

Commit

Permalink
Engine - ECS: rename EventRecorder.Reset() -> ClearEvents()
Browse files Browse the repository at this point in the history
  • Loading branch information
friflo committed Jan 30, 2024
1 parent d64d77a commit e18c9a1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Engine/Tests/ECS/EventFilter/Test_EventFilter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public static void Test_EventFilter_create_recorder()
recorder.Enabled = false;
IsFalse(recorder.Enabled);

recorder.Reset();
recorder.ClearEvents();
entity2.AddComponent<Position>();

AreEqual(0, recorder.ComponentEvents.Length);
Expand Down
10 changes: 5 additions & 5 deletions Engine/src/ECS/EventFilter/EventRecorder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ namespace Friflo.Engine.ECS;
public sealed class EventRecorder
{
#region properties
/// <summary> Return the number of all recorded events.<br/> Calling <see cref="Reset"/> does not affect the counter.</summary>
/// <summary> Return the number of all recorded events.<br/> Calling <see cref="ClearEvents"/> does not affect the counter.</summary>
public long AllEventsCount => allEventsCount;

/// <summary> Record component / tag events if true.<br/> It is required when using an <see cref="EventFilter"/>.</summary>
Expand Down Expand Up @@ -58,13 +58,13 @@ internal EventRecorder(EntityStore store)
/// <summary>
/// Clear all <see cref="ComponentEvents"/> and <see cref="TagEvents"/>.
/// </summary>
public void Reset()
public void ClearEvents()
{
ResetEvents(componentEvents);
ResetEvents(tagEvents);
Clear(componentEvents);
Clear(tagEvents);
}

private static void ResetEvents(EntityEvents events)
private static void Clear(EntityEvents events)
{
events.entityChanges.Clear();
events.eventCount = 0;
Expand Down

0 comments on commit e18c9a1

Please sign in to comment.