Skip to content

Commit

Permalink
refactor: adding logs for SyncPositionBehaviourCollection
Browse files Browse the repository at this point in the history
  • Loading branch information
James-Frowen committed Apr 11, 2022
1 parent 615983e commit 0338d85
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions source/SyncPositionSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -82,17 +82,20 @@ public class SyncPositionBehaviourCollection

public void AddBehaviour(SyncPositionBehaviour thing)
{
if (logger.LogEnabled()) logger.Log($"Added {thing.NetId}");
uint netId = thing.NetId;
_behaviours.Add(netId, thing);
}

public void RemoveBehaviour(SyncPositionBehaviour thing)
{
if (logger.LogEnabled()) logger.Log($"Removed {thing.NetId}");
uint netId = thing.NetId;
_behaviours.Remove(netId);
}
public void ClearBehaviours()
{
if (logger.LogEnabled()) logger.Log($"Cleared");
_behaviours.Clear();
}
}
Expand Down

0 comments on commit 0338d85

Please sign in to comment.