public void OnDieChanged(Die die)
 {
     if (!DieIcons.ContainsKey(die))
     {
         Debug.LogError("Trying to change die icon from overview panel that doesnt have an icon for said die.");
         return;
     }
     DieIcons[die].GetComponent <Image>().sprite = MasterManager.Instance.ResourceManager.GetSpriteByDieFace(die.DieFace);
     DieIcons[die].GetComponent <IconController>().SetFrozen(die.IsFrozen);
 }
        public void OnDieRemoved(Die die)
        {
            if (!DieIcons.ContainsKey(die))
            {
                Debug.LogError("Trying to remove die icon from overview panel that doesnt have an icon for said die.");
                return;
            }

            die.UnregisterOnDieChangedCallback(OnDieChanged);

            GameObject iconObject = DieIcons[die];

            DieIcons.Remove(die);
            Destroy(iconObject);
        }