예제 #1
0
        /// <summary>
        /// </summary>
        public override void RemotePostSetup()
        {
            if (this.normalised_overwrite_space_if_env_bounds)
            {
                switch (this._dim)
                {
                case Axis.X_:
                    if (this.ParentEnvironment)
                    {
                        this._observation_value_space =
                            Space1.FromCenterExtent(this.ParentEnvironment.PlayableArea.Bounds.extents.x);
                    }

                    break;

                case Axis.Y_:
                    if (this.ParentEnvironment)
                    {
                        this._observation_value_space =
                            Space1.FromCenterExtent(this.ParentEnvironment.PlayableArea.Bounds.extents.y);
                    }

                    break;

                case Axis.Z_:
                    if (this.ParentEnvironment)
                    {
                        this._observation_value_space =
                            Space1.FromCenterExtent(this.ParentEnvironment.PlayableArea.Bounds.extents.z);
                    }
                    break;
                }
            }
        }
        /// <summary>
        /// </summary>
        public override void RemotePostSetup()
        {
            if (this.normalised_overwrite_space_if_env_bounds)
            {
                var dec_gran = 4;
                if (this._single_value_space.Space != null && this.ParentEnvironment.PlayableArea)
                {
                    dec_gran = this._single_value_space.Space.DecimalGranularity;
                }

                if (this.ParentEnvironment)
                {
                    switch (this._axis_of_configuration)
                    {
                    case Axis.X_:
                        this.SingleSpace =
                            Space1.FromCenterExtent(this.ParentEnvironment.PlayableArea.Bounds.extents.x,
                                                    decimal_granularity: dec_gran);
                        break;

                    case Axis.Y_:
                        this.SingleSpace =
                            Space1.FromCenterExtent(this.ParentEnvironment.PlayableArea.Bounds.extents.y,
                                                    decimal_granularity: dec_gran);
                        break;

                    case Axis.Z_:
                        this.SingleSpace =
                            Space1.FromCenterExtent(this.ParentEnvironment.PlayableArea.Bounds.extents.z,
                                                    decimal_granularity: dec_gran);
                        break;
                    }
                }
            }
        }