예제 #1
0
파일: Gadget.cs 프로젝트: Svarog00/FlowAway
 private void GadgetManager_OnGadgetActivate(object sender, GadgetManager.OnGadgetActivateEventArgs e)
 {
     if (e.name == _gadgetName)
     {
         CanActivate = true;
         GadgetManager.OnGadgetActivate -= GadgetManager_OnGadgetActivate;
     }
 }
예제 #2
0
 //Icon should appear after binded gadget activated
 private void Gadget_OnGadgetActivate(object sender, GadgetManager.OnGadgetActivateEventArgs e)
 {
     if (_gadgetName == e.name)
     {
         _visual.SetActive(true);
         GadgetManager gadget = FindObjectOfType <GadgetManager>();
         gadget.OnGadgetCooldown += OnGadgetCooldown;
         gadget.OnGadgetActivate -= Gadget_OnGadgetActivate;
     }
 }