thing constuction registration

This commit is contained in:
Pascal Serrarens 2025-01-14 09:11:13 +01:00
parent e562e2433c
commit a8983f5a7a
4 changed files with 6 additions and 6 deletions

View File

@ -234,16 +234,16 @@ namespace Passer.Control.Core {
Console.WriteLine($"received name {msg.url}");
}
protected virtual void ProcessPoseMsg(PoseMsg msg) { }
protected virtual void Process(PoseMsg msg) { }
protected virtual void Process(CustomMsg msg) {
Thing thing = Thing.Get(msg.networkId, msg.thingId);
thing?.ProcessBytes(msg.bytes);
}
protected virtual void ProcessTextMsg(TextMsg temsgxt) { }
protected virtual void Process(TextMsg temsgxt) { }
protected virtual void ProcessDestroyMsg(DestroyMsg msg) { }
protected virtual void Process(DestroyMsg msg) { }
private void ForwardMessage(IMessage msg) {
foreach (Participant client in others) {

View File

@ -7,7 +7,7 @@ namespace Passer.Control.Core {
public override void ProcessBytes(byte[] bytes) {
byte ix = 0;
float temp = LowLevelMessages.ReceiveFloat16(bytes, ref ix);
UnityEngine.Debug.Log($"temperature {this.name} = {temp} C");
Console.WriteLine($"temperature {this.name} = {temp} C");
}
}

View File

@ -193,7 +193,7 @@ namespace Passer.Control.Core {
allThings.Add(thing);
if (invokeEvent)
OnNewThing?.Invoke(thing);
UnityEngine.Debug.Log($"Add thing [{thing.networkId}/{thing.id}] {thing.name}");
//UnityEngine.Debug.Log($"Add thing [{thing.networkId}/{thing.id}] {thing.name}");
}
}

View File

@ -1,4 +1,4 @@
using System;
using System;
using System.Threading;
using NUnit.Framework;