/// <summary> Init key bind element </summary> public void Init(InputType inputType, ActionKey actionKey) { Blocker.SetActive(false); InputType = inputType; ActionKey = actionKey; KeyText.text = actionKey.ToString(); ValueText.text = DictionaryKey.TryGetOrDefault(actionKey).ToString(); var btn = GetComponent <CustomButton>(); btn.onClick.AddListener(OnClickButton); }
/// <summary> Update value after change any key </summary> public void UpdateValue() { ValueText.text = DictionaryKey.TryGetOrDefault(ActionKey).ToString(); }