Neodroid  0.2.0
Machine Learning Environment Prototyping Tool
EnvironmentListener.cs
Go to the documentation of this file.
1 using System;
6 
7 namespace droid.Runtime.Prototyping.Internals {
11  public abstract class EnvironmentListener : PrototypingGameObject,
16 
19  public abstract override String PrototypingTypeName { get; }
20 
24  public abstract void EnvironmentReset();
25 
26  public virtual void PreStep() { }
27  public virtual void Step() { }
28  public virtual void PostStep() { }
29 
33  protected override void RegisterComponent() {
34  this._Parent_Environment =
35  NeodroidUtilities.RegisterComponent(this._Parent_Environment,
36  this);
37 
38  if (this._Parent_Environment != null) {
39  this._Parent_Environment.PreStepEvent += this.PreStep;
40  this._Parent_Environment.StepEvent += this.Step;
41  this._Parent_Environment.PostStepEvent += this.PostStep;
42  }
43  }
44 
48  protected override void UnRegisterComponent() { this._Parent_Environment?.UnRegister(this); }
49  }
50 }