public void CreateObjects(int count) { ObjectLink prev = null; for (int i = 0; i < count; ++i) { GoldBase b = GameObject.Instantiate(origin, Vector3.zero, Quaternion.identity).GetComponent <GoldBase>(); b.Initialize(); b.gameObject.name = "gold_" + i; ObjectLink link = new ObjectLink(b); if (i == 0) { disableFront = link; } else { prev.back = link; } b.gameObject.SetActive(false); prev = link; } }
public void InitObjects() { me.Initialize(); }