9 namespace droid.Runtime.Prototyping.Configurables {
13 [AddComponentMenu(ConfigurableComponentMenuPath._ComponentMenuPath
15 + ConfigurableComponentMenuPath._Postfix)]
21 public bool RelativeToExistingValue {
get {
return this._relative_to_existing_value; } }
27 public abstract ISpace ConfigurableValueSpace {
get; }
32 get {
return this._environment; }
33 set { this._environment = value; }
60 return new[] {
new Configuration(this.Identifier, this.ConfigurableValueSpace.Sample())};
66 protected sealed
override void Setup() { this.PreSetup(); }
76 this.ParentEnvironment = NeodroidUtilities.RegisterComponent(this.ParentEnvironment,
this);
82 public virtual void Tick() {
83 if (this.SampleRandom && Application.isPlaying &&
this.on_tick) {
84 foreach (var v
in this.SampleConfigurations()) {
85 this.ApplyConfiguration(v);
91 if (this.SampleRandom && Application.isPlaying && !
this.on_tick) {
100 foreach (var v
in this.SampleConfigurations()) {
101 this.ApplyConfiguration(v);
114 [Header(
"References", order = 20)]
120 [Header(
"Configurable", order = 30)]
122 bool _relative_to_existing_value =
false;
124 public bool SampleRandom {
get {
return this._sampleRandom; }
set { this._sampleRandom = value; } }
126 [SerializeField]
bool _sampleRandom =
false;
127 [SerializeField]
bool on_tick =
false;
override void RegisterComponent()
virtual Configuration [] SampleConfigurations()
virtual void PostEnvironmentSetup()
sealed override void Setup()
virtual void UpdateCurrentConfiguration()
override void UnRegisterComponent()