Neodroid  0.2.0
Machine Learning Environment Prototyping Tool
ECSDisplayer.cs
Go to the documentation of this file.
1 #if ECS_EXISTS
2 using droid.Neodroid.Environments;
3 using droid.Neodroid.Utilities;
4 using UnityEngine;
5 
6 namespace droid.Neodroid.Prototyping.Displayers.ECS {
7  public abstract class EcsDisplayer : MonoBehaviour {
8  PrototypingEnvironment _environment;
9 
10  public PrototypingEnvironment ParentEnvironment {
11  get { return this._environment; }
12  set { this._environment = value; }
13  }
14 
15  [SerializeField] bool _debugging;
16 
17  public bool Debugging { get { return this._debugging; } set { this._debugging = value; } }
18 
19  public virtual string Identifier { get { return this.name + "Displayer"; } }
20 
21  protected virtual void Awake() {
22  this.RegisterComponent();
23  this.Setup();
24  }
25 
26  protected virtual void Setup() { }
27 
28  void Start() { }
29 
30  public virtual void RefreshStart() { this.Start(); }
31 
32  protected virtual void RegisterComponent() {
33  this._environment = NeodroidUtilities.MaybeRegisterComponent(this._environment, this);
34  }
35 
36  public abstract void Display(float value);
37  public abstract void Display(double value);
38  public abstract void Display(float[] values);
39  public abstract void Display(string value);
40  }
41 }
42 #endif