Example #1
0
 /// <summary>
 /// A button in the scene was destroyed
 /// </summary>
 public void OnButtonRemove(ButtonRemoveEvent e)
 {
     if (e.Handled)
     {
         Log.Debug(string.Format("HeaderText.OnButtonRemoved({0})", e));
         string caption = string.Format("'{0}' was removed.", e.Name);
         text.text = caption;
     }
 }
Example #2
0
        protected override void OnEnable()
        {
            Log.Verbose(string.Format("ButtonHandler.OnEnable() name {0}", name));
            base.OnEnable();

            // Fresh reference on each enable
            buttonRemoveEvent = new ButtonRemoveEvent();
            On = false;
        }
Example #3
0
 /// <summary>
 /// Any button in the scene was clicked
 /// </summary>
 public void OnButtonRemove(ButtonRemoveEvent e)
 {
     // only this sender is handled here
     if ((!e.Handled) && (e.ButtonHandler == this))
     {
         Log.Debug(string.Format("ButtonHandler.OnButtonRemove({0}) name {1}", e, name));
         GameObject.Destroy(gameObject);
         // raise again as notice for logging, etc
         EventManager.Instance.Raise(new ButtonRemoveEvent()
         {
             ButtonHandler = this, Handled = true, Kind = kind, Name = name
         });
     }
 }