public UIButton(GameObject _go) : base(_go) { button = _go.GetComponent <Button>(); if (button != null) { button.AddClick(OnClickListener); } onClick = null; }
public UIButton(Button _btn) : base(_btn.gameObject) { button = _btn; if (button != null) { button.AddClick(OnClickListener); } onClick = null; }
public static void Main() { Button button = new Button(); button.AddClick(new Button.ClickHandler(ButtonHandler)); button.SimulateClick(); button.RemoveClick(new Button.ClickHandler(ButtonHandler)); }