public override void Init() { if (IsInit) return; IsInit = true; Paramater = GetComponent<ButtonParamater>(); Button = GetComponent<Button>(); IsPressedBinding.Filters = BindingFilter.Properties; IsPressedBinding.FilterTypes = new[] {typeof (bool)}; EnabledBinding.Action = UpdateState; EnabledBinding.Filters = BindingFilter.Properties; EnabledBinding.FilterTypes = new[] {typeof (bool)}; }
public override void Init() { if (IsInit) return; IsInit = true; // Grab dependencies Paramater = GetComponent<ButtonParamater>(); Button = GetComponent<Button>(); // Listen to button clicks Button.onClick.AddListener(Call); // Handle the Model.Enabled Change EnabledBinding.Action = UpdateState; }
public override void Init() { if (IsInit) { return; } IsInit = true; Paramater = GetComponent <ButtonParamater>(); Button = GetComponent <Button>(); IsPressedBinding.Filters = BindingFilter.Properties; IsPressedBinding.FilterTypes = new[] { typeof(bool) }; EnabledBinding.Action = UpdateState; EnabledBinding.Filters = BindingFilter.Properties; EnabledBinding.FilterTypes = new[] { typeof(bool) }; }
public override void Init() { if (IsInit) { return; } IsInit = true; // Grab dependencies Paramater = GetComponent <ButtonParamater>(); Button = GetComponent <Button>(); // Listen to button clicks Button.onClick.AddListener(Call); // Handle the Model.Enabled Change EnabledBinding.Action = UpdateState; }