Exemplo n.º 1
0
    /// <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);
    }
Exemplo n.º 2
0
 /// <summary> Update value after change any key </summary>
 public void UpdateValue()
 {
     ValueText.text = DictionaryKey.TryGetOrDefault(ActionKey).ToString();
 }