예제 #1
0
    DicePoolPanel GeneratePoolPanel(string name, int value)
    {
        DicePoolPanel panelResource = Resources.Load <DicePoolPanel>("Prefabs/DicePool");
        DicePoolPanel newPanel      = Instantiate <DicePoolPanel>(panelResource);

        return(newPanel);
    }
예제 #2
0
 public void CreateDicePool(string name, int value)
 {
     if (DicePoolPanels.Count <= MaxNumberOfPools)
     {
         DicePoolPanel newPanel = GeneratePoolPanel(name, value);
         DicePoolPanels.Add(name, newPanel);
         newPanel.transform.SetParent(DicePoolParent);
     }
 }