public void ShowActionMenu() { gameObject.GetComponent <CircleCollider2D>().radius = menuColliderRadius; switch (menuState) { case MenuState.Collapsing: menuTransitionStep = menuTotalSteps - menuTransitionStep; menuState = MenuState.Respawning; break; case MenuState.Respawning: break; case MenuState.Active: break; case MenuState.Disable: menuTransitionStep = menuTotalSteps; menuState = MenuState.Respawning; break; } activeButtons = new List <Button>(); foreach (var button in UIButtons) { if (guiScript.GetEnabledActions().Select(t => t.ToString()).Contains(button.name)) { button.gameObject.SetActive(true); activeButtons.Add(button); } } menuDegreeOffset = 360 / activeButtons.Count; }