Пример #1
0
 protected virtual void OnDisable()
 {
     StopAllCoroutines();
     if (_isOver)
     {
         DoRollOut(true);
     }
     if (_isPressed)
     {
         DoRelease(false, true);
     }
     if (_unclickTween != null && _unclickTween.IsPlaying())
     {
         _unclickTween.Complete();
     }
     if (_tooltip != null)
     {
         _tooltip.SetActive(false);
     }
     HOtk2dGUIManager.RemoveButton(this);
     // Remove from eventual toggle group
     if (_toggleGroupid != "")
     {
         List <HOtk2dButton> bts = _TogglesByGroupId[_toggleGroupid];
         bts.RemoveAt(bts.IndexOf(this));
         if (bts.Count <= 0)
         {
             _TogglesByGroupId.Remove(_toggleGroupid);
         }
     }
 }
Пример #2
0
 void ChangeCamera(Camera cam)
 {
     _guiCamera = cam;
     HOtk2dGUIManager.RemoveButton(this);
     HOtk2dGUIManager.AddButton(this);
 }