DicePoolPanel GeneratePoolPanel(string name, int value) { DicePoolPanel panelResource = Resources.Load <DicePoolPanel>("Prefabs/DicePool"); DicePoolPanel newPanel = Instantiate <DicePoolPanel>(panelResource); return(newPanel); }
public void CreateDicePool(string name, int value) { if (DicePoolPanels.Count <= MaxNumberOfPools) { DicePoolPanel newPanel = GeneratePoolPanel(name, value); DicePoolPanels.Add(name, newPanel); newPanel.transform.SetParent(DicePoolParent); } }