ShopMenu.connectShopItemInfos C# (CSharp) Метод

connectShopItemInfos() приватный Метод

private connectShopItemInfos ( ) : void
Результат void
    private void connectShopItemInfos()
    {
        bool switchOff = false;
        if (!panel.gameObject.activeSelf) {
          panel.gameObject.SetActive(true);
          switchOff = true;
        }

        ShopItemInfo[] foundStars = panel.GetComponentsInChildren<ShopItemInfo>();
        if (switchOff)
          panel.gameObject.SetActive(false);

        stars = new ShopItemInfo[(int)UpgradeLevel.Type.Count];
        foreach (var s in foundStars) {
          if (stars[(int)s.type] != null) {
        Debug.LogError("More than one ShopItemInfo component of type " + s.type.ToString() + " found. Please fix!");
        break;
          }

          stars[(int)s.type] = s;
        }
    }