Init Unity documentation

This commit is contained in:
Pascal Serrarens 2025-02-19 16:49:54 +01:00
parent 7b21331afb
commit 383f0c1793
2 changed files with 16 additions and 1 deletions

View File

@ -3,11 +3,20 @@ using UnityEngine;
namespace Passer.RoboidControl.Unity {
/// <summary>
/// The representation of a Thing in Unity
/// </summary>
public class Thing : MonoBehaviour {
/// <summary>
/// The core C# thing
/// </summary>
[field: SerializeField]
public RoboidControl.Thing core {get; set; }
/// <summary>
/// Set the core C# thing
/// </summary>
protected void SetCoreThing(RoboidControl.Thing thing) {
core = thing;
core.component = this;
@ -20,6 +29,9 @@ namespace Passer.RoboidControl.Unity {
siteServer.site.Add(thing);
}
/// <summary>
/// Update the Unity representation
/// </summary>
protected virtual void Update() {
if (core == null)
return;

View File

@ -3,6 +3,9 @@ using UnityEngine;
namespace Passer.RoboidControl.Unity {
/// <summary>
/// The Unity representation of the TouchSensor
/// </summary>
public class TouchSensor : Thing {
public RoboidControl.TouchSensor coreSensor {