1 using System.Collections.Generic;
8 namespace droid.Runtime.Prototyping.Sensors.Grid {
10 SensorComponentMenuPath._ComponentMenuPath +
"GoalCell" + SensorComponentMenuPath._Postfix)]
14 [SerializeField] Vector3 _current_goal_position;
16 [SerializeField]
bool _draw_names =
true;
18 [SerializeField]
int _order_index;
22 public int OrderIndex {
get {
return this._order_index; }
set { this._order_index = value; } }
26 public bool DrawNames {
get {
return this._draw_names; }
set { this._draw_names = value; } }
31 public override string PrototypingTypeName {
get {
return "GoalObserver"; } }
37 this.UpdateObservation();
38 return this._current_goal;
40 set { this._current_goal = value; }
46 public Vector3 ObservationValue {
47 get {
return this._current_goal_position; }
48 private set { this._current_goal_position = value; }
56 public override IEnumerable<float> FloatEnumerable {
59 this._current_goal_position.x,
60 this._current_goal_position.y,
61 this._current_goal_position.z
69 if (this._current_goal) {
70 this._current_goal_position = this._current_goal.transform.position;
75 void OnDrawGizmosSelected() {
77 if (this._current_goal) {
78 NeodroidDrawingUtilities.DrawString(this._current_goal.name,
79 this._current_goal.transform.position,
override void UpdateObservation()