public void ShowDice(Popup.PopupAction diceAction) { IconPopup dicePopup = new IconPopup(IconPopupType.Dice, diceAction); GameObject dice = boxPools[typeof(IconBox)].TakeObject(); dice.GetComponent <Animator>().SetBool("Dice", true); DiceBox = dice.GetComponent <IconBox>(); DiceBox.Init(dicePopup); }