示例#1
0
 void Start()
 {
     _onClick = new OnClick();
     _onClick.AddListener(delegate(string message)
     {
         _msg_out = message;
     });
 }
 private void AddListeners()
 {
     if (allowMultipleClicks == false)
     {
         OnClick.AddListener(DisableButton);
         OnDoubleClick.AddListener(DisableButton);
         OnLongClick.AddListener(DisableButton);
     }
 }
示例#3
0
    void Start()
    {
        inputField.onEndEdit.AddListener((text) =>
        {
            KKUtilities.Delay(1, () => inputField.interactable = false, this);
        });
        OnClick.AddListener(() =>
        {
            inputField.interactable = true;

            inputField.Select();
        });
    }
示例#4
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="callback"></param>
 public void AddOnClickListener(UnityAction callback)
 {
     onClick.AddListener(callback);
 }
示例#5
0
 void Awake()
 {
     button = GetComponent <Button>();
     S      = this;
     OnClick.AddListener(MakeUnitTalk);
 }