Migrated to smell

This commit is contained in:
Pascal Serrarens 2025-02-14 17:42:50 +01:00
parent c5dc3b6bf5
commit 30496197ec
2 changed files with 3 additions and 3 deletions

View File

@ -27,7 +27,7 @@ namespace Passer.Control.Core {
} }
public void Add(Thing thing, bool invokeEvent = true) { public void Add(Thing thing, bool invokeEvent = true) {
Console.WriteLine($"added thing [{thing.networkId}/{thing.id}]"); // Console.WriteLine($"added thing [{thing.networkId}/{thing.id}]");
Thing foundThing = Get(thing.networkId, thing.id); Thing foundThing = Get(thing.networkId, thing.id);
if (foundThing == null) { if (foundThing == null) {
@ -41,7 +41,7 @@ namespace Passer.Control.Core {
// should be: find first non-existing id... // should be: find first non-existing id...
thing.id = (byte)this.things.Count; thing.id = (byte)this.things.Count;
things.Add(thing); things.Add(thing);
Console.Write($"Add thing, updated thing id to [{thing.networkId}/{thing.id}]"); // Console.Write($"Add thing, updated thing id to [{thing.networkId}/{thing.id}]");
} }
} }
} }

View File

@ -32,7 +32,7 @@ namespace Passer.Control.Unity {
if (Physics.Raycast(this.transform.position, this.transform.forward, out RaycastHit hitInfo, 2.0f)) { if (Physics.Raycast(this.transform.position, this.transform.forward, out RaycastHit hitInfo, 2.0f)) {
Thing thing = hitInfo.transform.GetComponentInParent<Thing>(); Thing thing = hitInfo.transform.GetComponentInParent<Thing>();
if (thing == null) { if (thing == null) {
Debug.Log($"collision {hitInfo.transform.name} {hitInfo.distance}"); // Debug.Log($"collision {hitInfo.transform.name} {hitInfo.distance}");
core.distance = hitInfo.distance; core.distance = hitInfo.distance;
} }
else else