Пример #1
0
    private void LoadZoneInfo(int zoneIndex)
    {
        UIHelpers.DestroyAllChildren(zoneContentPanel.transform);

        var zoneInfo = (GameObject)Instantiate(zoneInfoPrefab);

        UIHelpers.UpdateTextComponent(zoneInfo, "ZoneName", worldItemList[zoneIndex].name);

        var zoneInfoButton = zoneInfo.GetComponentInChildren <Button>();

        zoneInfoButton.onClick.AddListener(delegate { EnterZone(zoneIndex); });

        zoneInfo.transform.SetParent(zoneContentPanel.transform);
    }