public static void Postfix(bool __result) { if (!__result) { ButtonManager.ResetButtons(); foreach (CooldownButton button in ButtonManager.RegisteredButtons) { if (button.CanUse()) { ButtonManager.AddButton(button); } else { button.gameObject.Destroy(); // to not overload ?? } } } }
public void OnJoinedRoom() { buttonManager.AddButton("Send " + gameObject.name, Send); }