public CategoryListManager(string[] tags) { this.categoryTags = tags; foreach (string category in categoryTags) { GameObject[] categoryItems = GameObject.FindGameObjectsWithTag (category); List<GameObject> l = new List<GameObject>(); for (int i = 0; i < categoryItems.Length; i++) { l.Add(categoryItems[i]); } l.Sort (compareByTag); ItemListManager listManager = new ItemListManager(); foreach (GameObject item in l) { GameObjectManipulator itemManipulator = new GameObjectManipulator(item); listManager.add (itemManipulator); } categoriesMap.Add(category, listManager); listManager.hideAll(); } }
public void add(GameObjectManipulator item) { this.objectList.Add (item); }
void showItem(GameObjectManipulator gameObject) { gameObject.setPosition (currentPosition); gameObject.hardMove (); gameObject.show (); }