public void Spwan() { GhostShadow item = null; if (_inactiveList.Count > 0) { item = _inactiveList[0]; _inactiveList.Remove(item); } else { item = SpawnNew(); InitShadow(item); } item.SetActive(true); UpdateShadow(item); _activeList.Add(item); }
private void Despwan(GhostShadow item) { _activeList.Remove(item); _inactiveList.Add(item); item.SetActive(false); }