Init Unity documentation
This commit is contained in:
parent
7b21331afb
commit
383f0c1793
@ -2,12 +2,21 @@
|
|||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
namespace Passer.RoboidControl.Unity {
|
namespace Passer.RoboidControl.Unity {
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The representation of a Thing in Unity
|
||||||
|
/// </summary>
|
||||||
public class Thing : MonoBehaviour {
|
public class Thing : MonoBehaviour {
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The core C# thing
|
||||||
|
/// </summary>
|
||||||
[field: SerializeField]
|
[field: SerializeField]
|
||||||
public RoboidControl.Thing core {get; set; }
|
public RoboidControl.Thing core {get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Set the core C# thing
|
||||||
|
/// </summary>
|
||||||
protected void SetCoreThing(RoboidControl.Thing thing) {
|
protected void SetCoreThing(RoboidControl.Thing thing) {
|
||||||
core = thing;
|
core = thing;
|
||||||
core.component = this;
|
core.component = this;
|
||||||
@ -20,6 +29,9 @@ namespace Passer.RoboidControl.Unity {
|
|||||||
siteServer.site.Add(thing);
|
siteServer.site.Add(thing);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Update the Unity representation
|
||||||
|
/// </summary>
|
||||||
protected virtual void Update() {
|
protected virtual void Update() {
|
||||||
if (core == null)
|
if (core == null)
|
||||||
return;
|
return;
|
||||||
|
@ -3,6 +3,9 @@ using UnityEngine;
|
|||||||
|
|
||||||
namespace Passer.RoboidControl.Unity {
|
namespace Passer.RoboidControl.Unity {
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The Unity representation of the TouchSensor
|
||||||
|
/// </summary>
|
||||||
public class TouchSensor : Thing {
|
public class TouchSensor : Thing {
|
||||||
|
|
||||||
public RoboidControl.TouchSensor coreSensor {
|
public RoboidControl.TouchSensor coreSensor {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user