Exemplo n.º 1
0
    // Use this for initialization
    void Start()
    {
        MySlots = new List <csSlotStorage>();


        for (int i = 0; i < 28; i++)
        {
            GameObject slot = NGUITools.AddChild(gameObject, slotPrefabs);

            slot.GetComponent <csSlotStorage>().index = i;
            MySlots.Add(slot.GetComponent <csSlotStorage>());
        }
        emptySlots = 28;

        m_Grid.Reposition();


        StartCoroutine(MyItemRegister());

        metalSprite   = GameObject.Find("metaItemSprite").GetComponent <UISprite>();
        circuitSprite = GameObject.Find("circuitItemSprite").GetComponent <UISprite>();
        junkSprite    = GameObject.Find("junkItemSprite").GetComponent <UISprite>();

        metalLabel   = GameObject.Find("metalCountLabel").GetComponent <UILabel>();
        circuitLabel = GameObject.Find("circuitCountLabel").GetComponent <UILabel>();
        junkLabel    = GameObject.Find("junkCountLabel").GetComponent <UILabel>();

        metalNameLabel   = GameObject.Find("metalLabel").GetComponent <UILabel>();
        circuitNameLabel = GameObject.Find("circuitLabel").GetComponent <UILabel>();
        junkNameLabel    = GameObject.Find("junkLabel").GetComponent <UILabel>();

        selectedItem = GameObject.Find("SelectedItem").GetComponent <csSeletedItem>();
    }
Exemplo n.º 2
0
    void Start()
    {
        items = new Stack <csItem>();

        mRoot = NGUITools.FindInParents <UIRoot>(transform.parent);

        manager = GameObject.Find("Backpack").GetComponent <csInventory>();

        Front_Leg = GameObject.Find("FrontLeg").GetComponent <csSlotStorage>();

        Back_Leg = GameObject.Find("BackLeg").GetComponent <csSlotStorage>();

        selectedItem = GameObject.Find("SelectedItem").GetComponent <csSeletedItem>();

        shop    = GameObject.Find("Shop");
        Factory = GameObject.Find("Factory");
    }
Exemplo n.º 3
0
    // Use this for initialization
    void Start()
    {
        MySlots = new List<csSlotStorage>();

        for(int i = 0; i < 28; i++)
        {
            GameObject slot = NGUITools.AddChild(gameObject, slotPrefabs);

            slot.GetComponent<csSlotStorage>().index = i;
            MySlots.Add(slot.GetComponent<csSlotStorage>());
        }
        emptySlots = 28;

        m_Grid.Reposition();

        StartCoroutine(MyItemRegister());

        metalSprite = GameObject.Find("metaItemSprite").GetComponent<UISprite>();
        circuitSprite = GameObject.Find("circuitItemSprite").GetComponent<UISprite>();
        junkSprite = GameObject.Find("junkItemSprite").GetComponent<UISprite>();

        metalLabel = GameObject.Find("metalCountLabel").GetComponent<UILabel>();
        circuitLabel = GameObject.Find("circuitCountLabel").GetComponent<UILabel>();
        junkLabel = GameObject.Find("junkCountLabel").GetComponent<UILabel>();

        metalNameLabel = GameObject.Find("metalLabel").GetComponent<UILabel>();
        circuitNameLabel = GameObject.Find("circuitLabel").GetComponent<UILabel>();
        junkNameLabel = GameObject.Find("junkLabel").GetComponent<UILabel>();

        selectedItem = GameObject.Find("SelectedItem").GetComponent<csSeletedItem>();
    }
Exemplo n.º 4
0
    void Start()
    {
        items = new Stack<csItem>();

        mRoot = NGUITools.FindInParents<UIRoot>(transform.parent);

        manager = GameObject.Find("Backpack").GetComponent<csInventory>();

        Front_Leg = GameObject.Find("FrontLeg").GetComponent<csSlotStorage>();

        Back_Leg = GameObject.Find("BackLeg").GetComponent<csSlotStorage>();

        selectedItem = GameObject.Find("SelectedItem").GetComponent<csSeletedItem>();

        shop = GameObject.Find("Shop");
        Factory = GameObject.Find("Factory");
    }