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); } }
void Start() { inputField.onEndEdit.AddListener((text) => { KKUtilities.Delay(1, () => inputField.interactable = false, this); }); OnClick.AddListener(() => { inputField.interactable = true; inputField.Select(); }); }
/// <summary> /// /// </summary> /// <param name="callback"></param> public void AddOnClickListener(UnityAction callback) { onClick.AddListener(callback); }
void Awake() { button = GetComponent <Button>(); S = this; OnClick.AddListener(MakeUnitTalk); }