thing constuction registration
This commit is contained in:
parent
e562e2433c
commit
a8983f5a7a
@ -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) {
|
||||
|
@ -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");
|
||||
}
|
||||
}
|
||||
|
||||
|
2
Thing.cs
2
Thing.cs
@ -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}");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.Threading;
|
||||
using NUnit.Framework;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user