void Start() { this.InnerPreStart(); if (!this._time_simulation_manager) { this._time_simulation_manager = FindObjectOfType <NeodroidManager>(); } if (!this._objective_function) { this._objective_function = FindObjectOfType <ObjectiveFunction>(); } this._time_simulation_manager = NeodroidUtilities.MaybeRegisterComponent( this._time_simulation_manager, (NeodroidEnvironment)this); this.SaveInitialPoses(); this.StartCoroutine(this.SaveInitialBodiesIE()); }
/// <inheritdoc /> /// <summary> /// /// </summary> protected override void Setup() { this._grid = new int[this._width, this._height]; var k = 0; for (var i = 0; i < this._width; i++) { for (var j = 0; j < this._height; j++) { this._grid[i, j] = k++; } } this._time_simulation_manager = (IManager)NeodroidUtilities.MaybeRegisterComponent( (NeodroidManager)this._time_simulation_manager, this); }
/// <summary> /// /// </summary> protected override void RegisterComponent() { this.ParentEnvironment = NeodroidUtilities.MaybeRegisterComponent( (PrototypingEnvironment)this.ParentEnvironment, (Configurable)this); this.ParentEnvironment = NeodroidUtilities.MaybeRegisterNamedComponent( (PrototypingEnvironment)this.ParentEnvironment, (Configurable)this, this._x); this.ParentEnvironment = NeodroidUtilities.MaybeRegisterNamedComponent( (PrototypingEnvironment)this.ParentEnvironment, (Configurable)this, this._y); this.ParentEnvironment = NeodroidUtilities.MaybeRegisterNamedComponent( (PrototypingEnvironment)this.ParentEnvironment, (Configurable)this, this._z); }
protected override void AddToEnvironment() { this._x = this.ConfigurableIdentifier + "X"; this._y = this.ConfigurableIdentifier + "Y"; this._z = this.ConfigurableIdentifier + "Z"; this.ParentEnvironment = NeodroidUtilities.MaybeRegisterComponent( this.ParentEnvironment, (ConfigurableGameObject)this); this.ParentEnvironment = NeodroidUtilities.MaybeRegisterNamedComponent( this.ParentEnvironment, (ConfigurableGameObject)this, this._x); this.ParentEnvironment = NeodroidUtilities.MaybeRegisterNamedComponent( this.ParentEnvironment, (ConfigurableGameObject)this, this._y); this.ParentEnvironment = NeodroidUtilities.MaybeRegisterNamedComponent( this.ParentEnvironment, (ConfigurableGameObject)this, this._z); }
/// <inheritdoc /> /// <summary> /// </summary> protected override void RegisterComponent() { this.ParentActor = NeodroidUtilities.MaybeRegisterNamedComponent( (Actor)this.ParentActor, (Motor)this, this._movement); this.ParentActor = NeodroidUtilities.MaybeRegisterNamedComponent( (Actor)this.ParentActor, (Motor)this, this._turn); this._parent_environment = NeodroidUtilities.MaybeRegisterComponent( (PrototypingEnvironment)this._parent_environment, this); if (this._parent_environment != null) { this._parent_environment.PreStepEvent += this.PreStep; this._parent_environment.StepEvent += this.Step; this._parent_environment.PostStepEvent += this.PostStep; } }
public override void RegisterComponent() { this.ParentActor = NeodroidUtilities.MaybeRegisterComponent(this.ParentActor, (Motor)this); this._x = this.MotorIdentifier + "X"; this._y = this.MotorIdentifier + "Y"; this._z = this.MotorIdentifier + "Z"; this._rot_x = this.MotorIdentifier + "RotX"; this._rot_y = this.MotorIdentifier + "RotY"; this._rot_z = this.MotorIdentifier + "RotZ"; this.ParentActor = NeodroidUtilities.MaybeRegisterNamedComponent(this.ParentActor, (Motor)this, this._x); this.ParentActor = NeodroidUtilities.MaybeRegisterNamedComponent(this.ParentActor, (Motor)this, this._y); this.ParentActor = NeodroidUtilities.MaybeRegisterNamedComponent(this.ParentActor, (Motor)this, this._z); this.ParentActor = NeodroidUtilities.MaybeRegisterNamedComponent(this.ParentActor, (Motor)this, this._rot_x); this.ParentActor = NeodroidUtilities.MaybeRegisterNamedComponent(this.ParentActor, (Motor)this, this._rot_y); this.ParentActor = NeodroidUtilities.MaybeRegisterNamedComponent(this.ParentActor, (Motor)this, this._rot_z); }
public virtual void RegisterComponent() { this.ParentEnvironment = NeodroidUtilities.MaybeRegisterComponent(this.ParentEnvironment, this); }
public virtual void RegisterComponent() { this._actor = NeodroidUtilities.MaybeRegisterComponent(this._actor, this); }
protected virtual void RegisterComponent() { this._environment = NeodroidUtilities.MaybeRegisterComponent(this._environment, this); }
/// <inheritdoc /> /// <summary> /// </summary> protected override void RegisterComponent() { this.ParentEnvironment = NeodroidUtilities.MaybeRegisterComponent( (PrototypingEnvironment)this.ParentEnvironment, this); }
protected virtual void AddToEnvironment() { this.ParentEnvironment = NeodroidUtilities.MaybeRegisterComponent(this.ParentEnvironment, this); }
/// <inheritdoc /> /// <summary> /// </summary> protected override void RegisterComponent() { this._objective_function = NeodroidUtilities.MaybeRegisterComponent(this._objective_function, this); }