예제 #1
0
    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();
        }
    }
예제 #2
0
 public void add(GameObjectManipulator item)
 {
     this.objectList.Add (item);
 }
예제 #3
0
 void showItem(GameObjectManipulator gameObject)
 {
     gameObject.setPosition (currentPosition);
     gameObject.hardMove ();
     gameObject.show ();
 }