Пример #1
0
    public void Initialize()
    {
        _cells = new List <AsteroidCell>();

        for (int i = 0; i < 10; i++)
        {
            GameObject anchorObject = GameObject.Instantiate(Resources.Load("AsteroidCellAnchor")) as GameObject;
            anchorObject.name = "AsteroidCell" + i;
            anchorObject.transform.position = new Vector3(100000, 100000, 100000);
            AsteroidCell cell = anchorObject.GetComponent <AsteroidCell>();
            cell.Initialize(this);
            cell.PopulateAsteroids();
            _cells.Add(cell);
        }
    }