Merge commit '24285831109e32989d22ed58121c9f09d5db940b'
This commit is contained in:
commit
458f256c47
@ -27,7 +27,7 @@ namespace Passer.Control.Core {
|
||||
}
|
||||
|
||||
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);
|
||||
|
||||
if (foundThing == null) {
|
||||
@ -41,7 +41,7 @@ namespace Passer.Control.Core {
|
||||
// should be: find first non-existing id...
|
||||
thing.id = (byte)this.things.Count;
|
||||
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}]");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -7,6 +7,7 @@ namespace Passer.Control.Unity {
|
||||
public class DistanceSensor : Thing {
|
||||
|
||||
public new Core.DistanceSensor core {
|
||||
get => (Core.DistanceSensor)base.core;
|
||||
get => (Core.DistanceSensor)base.core;
|
||||
set => base.core = value;
|
||||
}
|
||||
@ -32,7 +33,7 @@ namespace Passer.Control.Unity {
|
||||
if (Physics.Raycast(this.transform.position, this.transform.forward, out RaycastHit hitInfo, 2.0f)) {
|
||||
Thing thing = hitInfo.transform.GetComponentInParent<Thing>();
|
||||
if (thing == null) {
|
||||
Debug.Log($"collision {hitInfo.transform.name} {hitInfo.distance}");
|
||||
// Debug.Log($"collision {hitInfo.transform.name} {hitInfo.distance}");
|
||||
core.distance = hitInfo.distance;
|
||||
}
|
||||
else
|
||||
|
Loading…
x
Reference in New Issue
Block a user