Exemple #1
0
 public UIButton(GameObject _go) : base(_go)
 {
     button = _go.GetComponent <Button>();
     if (button != null)
     {
         button.AddClick(OnClickListener);
     }
     onClick = null;
 }
Exemple #2
0
 public UIButton(Button _btn) : base(_btn.gameObject)
 {
     button = _btn;
     if (button != null)
     {
         button.AddClick(OnClickListener);
     }
     onClick = null;
 }
Exemple #3
0
    public static void Main()
    {
        Button button = new Button();

        button.AddClick(new Button.ClickHandler(ButtonHandler));

        button.SimulateClick();

        button.RemoveClick(new Button.ClickHandler(ButtonHandler));
    }