private void GadgetManager_OnGadgetActivate(object sender, GadgetManager.OnGadgetActivateEventArgs e) { if (e.name == _gadgetName) { CanActivate = true; GadgetManager.OnGadgetActivate -= GadgetManager_OnGadgetActivate; } }
//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; } }