Skip to content

Commit

Permalink
format TagEvents() example
Browse files Browse the repository at this point in the history
  • Loading branch information
friflo committed Jan 4, 2025
1 parent bb23233 commit 283e624
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Tests/ECS/Examples/General.cs
Original file line number Diff line number Diff line change
Expand Up @@ -230,11 +230,11 @@ public static void TagEvents()
entity.OnTagsChanged += ev =>
{
string log = "";
if (ev.AddedTags. Has<MyTag1>()) log += ", added: MyTag1";
if (ev.RemovedTags.Has<MyTag1>()) log += ", removed: MyTag1";
if (ev.AddedTags. Has<MyTag1>()) { log += ", added: MyTag1"; }
if (ev.RemovedTags.Has<MyTag1>()) { log += ", removed: MyTag1"; }

if (ev.AddedTags. Has<MyTag2>()) log += ", added: MyTag2";
if (ev.RemovedTags.Has<MyTag2>()) log += ", removed: MyTag2";
if (ev.AddedTags. Has<MyTag2>()) { log += ", added: MyTag2"; }
if (ev.RemovedTags.Has<MyTag2>()) { log += ", removed: MyTag2"; }

Console.WriteLine($"entity {entity.Id}{log}");
};
Expand Down

0 comments on commit 283e624

Please sign in to comment.