Neodroid  0.2.0
Machine Learning Environment Prototyping Tool
TransformEnvironmentListener.cs
Go to the documentation of this file.
1 using UnityEngine;
2 
3 namespace droid.Runtime.Prototyping.Internals {
7  [AddComponentMenu(ResetableComponentMenuPath._ComponentMenuPath
8  + "Transform"
9  + ResetableComponentMenuPath._Postfix)]
13  Vector3 _original_position;
14 
17  Quaternion _original_rotation;
18 
22  public override string PrototypingTypeName { get { return "Transform"; } }
23 
27  public override void EnvironmentReset() {
28  this.transform.position = this._original_position;
29  this.transform.rotation = this._original_rotation;
30  }
31 
34  protected override void Setup() {
35  this._original_position = this.transform.position;
36  this._original_rotation = this.transform.rotation;
37  }
38  }
39 }