private void InitializeToggles() { _costToggle = _uiGenerator.CreateCostToggle(); _flatsToggle = _uiGenerator.CreateFlatCountToggle(); _costToggle.Toggle.onClick.AddListener(ToggleCost); _flatsToggle.Toggle.onClick.AddListener(ToggleFlats); }
private IGradeToggleView CreateToggle(GameObject prefab) { IGradeToggleView view = _monoBehaviourProvider.CreateInstance(prefab, _canvas).AddComponent <GradeToggleView>(); return(view); }