コード例 #1
0
    public void AddStar()
    {
        HelperFuncs.ASSERT(m_currentActiveStars > m_childrenList.Count, "Can`t activate more stars, than avaliable");

        if (m_currentActiveStars == m_childrenList.Count)
        {
            GameObject newStar = Instantiate(m_starInstance, transform);
            m_childrenList.Add(newStar);
        }

        m_childrenList[m_currentActiveStars].SetActive(true);
        ++m_currentActiveStars;
    }