private void OnTargetUIValueChange(string value) { if (!this.ignore) { PropertiesManager.SetValue(base.sourceTargetName, value); } }
protected virtual void Start() { ManagedProperty property = PropertiesManager.GetProperty(this.sourceTargetName); this.getter = ((property != null) ? property.getter : null); PropertiesManager.AddValueChangeListener(this.sourceTargetName, this.OnValueChanged); if (this.getter != null) { this.getter.UpdateValue(); this.OnValueChanged(); } }
public override void Initialize(Component owner) { base.Initialize(owner); if (base.isSetter) { base.RegisterBind(this.valSetterSource.databind); } else { base.RegisterBindWithCallbacks(this.valSetterSource.databind); } if (!base.isSetter) { this.p = PropertiesManager.GetProperty(this.propertyName); ManagedProperty obj = this.p; if (obj != null) { obj.AddValueChangeListener(this.OnPropertyValueChange); } } }
protected void Awake() { Object.DontDestroyOnLoad(base.gameObject); base.gameObject.name = "Bootstrap"; BloxGlobal.Create(this.bloxGlobalPrefab); PropertiesManager.OnBootstrapAwake(); if (!Bootstrap.StartedViaUnityPlayButton) { if (this.startupScenes.Count > 0 && this.startupScenes[0] > 0 && this.startupScenes[0] < SceneManager.sceneCountInBuildSettings) { SceneManager.LoadScene(this.startupScenes[0], LoadSceneMode.Single); } else if (SceneManager.sceneCountInBuildSettings > 1) { SceneManager.LoadScene(1, LoadSceneMode.Single); } else { Debug.LogError("There are no scenes for the Bootstrap to load. You need to add at least one game scene to the Build Settings List or via the Blox Game Systems Window."); } } else { List <int> list = new List <int>(); for (int i = 0; i < SceneManager.sceneCount; i++) { list.Add(SceneManager.GetSceneAt(i).buildIndex); } for (int j = 0; j < this.autoloadScenes.Count; j++) { int num = this.autoloadScenes[j]; if (!list.Contains(num) && num > 0 && num < SceneManager.sceneCountInBuildSettings) { list.Add(num); SceneManager.LoadScene(num, LoadSceneMode.Additive); } } } }
protected virtual void OnDestroy() { PropertiesManager.RemoveValueChangeListener(this.sourceTargetName, this.OnValueChanged); }
public override void Execute(object blackboardValue) { PropertiesManager.SetValue(this.propertyName, this.valSetterSource.GetValue(base.owner, blackboardValue)); }
private void OnDestroy() { PropertiesManager.manager = null; PropertiesManager.cachedProperties = null; }