diff --git a/Sensors/TouchSensor.cs b/Sensors/TouchSensor.cs index fb86613..c05b59b 100644 --- a/Sensors/TouchSensor.cs +++ b/Sensors/TouchSensor.cs @@ -1,4 +1,4 @@ -namespace Passer.RoboidControl.Core { +namespace Passer.RoboidControl { public class TouchSensor : Thing { public bool touchedSomething = false; diff --git a/ThingMsg.cs.meta b/ThingMsg.cs.meta deleted file mode 100644 index 0c7dce0..0000000 --- a/ThingMsg.cs.meta +++ /dev/null @@ -1,2 +0,0 @@ -fileFormatVersion: 2 -guid: 718e148be3eeb65498334ed008747482 \ No newline at end of file diff --git a/Unity/DistanceSensor.cs b/Unity/DistanceSensor.cs index b28340d..dc934eb 100644 --- a/Unity/DistanceSensor.cs +++ b/Unity/DistanceSensor.cs @@ -2,7 +2,7 @@ using System.Collections; using UnityEngine; -namespace Passer.Control.Unity { +namespace Passer.RoboidControl.Unity { public class DistanceSensor : Thing { @@ -20,7 +20,7 @@ namespace Passer.Control.Unity { StartCoroutine(MeasureDistance()); } - public static DistanceSensor Create(Core.Thing parent) { + public static DistanceSensor Create(RoboidControl.Thing parent) { GameObject distanceObj = new("Distance sensor"); DistanceSensor component = distanceObj.AddComponent(); if (parent != null && parent.component != null) diff --git a/Unity/SiteServer.cs b/Unity/SiteServer.cs index f809360..fcc32b1 100644 --- a/Unity/SiteServer.cs +++ b/Unity/SiteServer.cs @@ -3,32 +3,32 @@ using System; using System.Collections.Generic; using UnityEngine; -namespace Passer.Control.Unity { +namespace Passer.RoboidControl.Unity { public class SiteServer : MonoBehaviour { - public Core.SiteServer site; + public RoboidControl.SiteServer site; - public Queue thingQueue = new(); + public Queue thingQueue = new(); protected virtual void Awake() { - Console.SetOut(new UnityLogWriter()); + //Console.SetOut(new UnityLogWriter()); site = new(7681); - Core.Thing.OnNewThing += HandleNewThing; + RoboidControl.Thing.OnNewThing += HandleNewThing; } void OnApplicationQuit() { site.Close(); } - public void HandleNewThing(Core.Thing thing) { + public void HandleNewThing(RoboidControl.Thing thing) { site.Add(thing, false); thingQueue.Enqueue(thing); } protected virtual void Update() { site.Update((ulong)(Time.time * 1000)); - while (thingQueue.TryDequeue(out Core.Thing thing)) + while (thingQueue.TryDequeue(out RoboidControl.Thing thing)) thing.CreateComponent(); } } diff --git a/Unity/Thing.cs b/Unity/Thing.cs index a280ca2..aa03f00 100644 --- a/Unity/Thing.cs +++ b/Unity/Thing.cs @@ -1,14 +1,14 @@ #if UNITY_5_3_OR_NEWER using UnityEngine; -namespace Passer.Control.Unity { +namespace Passer.RoboidControl.Unity { public class Thing : MonoBehaviour { [field: SerializeField] - public Core.Thing core {get; set; } + public RoboidControl.Thing core {get; set; } - protected void SetCoreThing(Core.Thing thing) { + protected void SetCoreThing(RoboidControl.Thing thing) { core = thing; core.component = this; diff --git a/Unity/TouchSensor.cs b/Unity/TouchSensor.cs index fe31b1b..bd9c8d6 100644 --- a/Unity/TouchSensor.cs +++ b/Unity/TouchSensor.cs @@ -1,23 +1,23 @@ #if UNITY_5_3_OR_NEWER using UnityEngine; -namespace Passer.Control.Unity { +namespace Passer.RoboidControl.Unity { public class TouchSensor : Thing { - public Core.TouchSensor coreSensor { - get => (Core.TouchSensor)base.core; + public RoboidControl.TouchSensor coreSensor { + get => (RoboidControl.TouchSensor)base.core; } protected virtual void Start() { if (core == null) { SiteServer siteServer = FindAnyObjectByType(); - SetCoreThing(new Core.TouchSensor(siteServer.site)); + SetCoreThing(new RoboidControl.TouchSensor(siteServer.site)); } } - public static TouchSensor Create(Core.TouchSensor core) { + public static TouchSensor Create(RoboidControl.TouchSensor core) { GameObject gameObj = core.name != null ? new(core.name) : new("Touch Sensor");