示例#1
0
    // Script Excution Order 사용함
    // Edit - Project Settings -Script Excution Order

    // Use this for initialization
    void Start()
    {
        Scrollbar1.size = 0.05f;
        Scrollbar2.size = 0.05f;

        item_Database = GameObject.Find("ItemJsonDataBase").
                        GetComponent <Item_Json_DataBase>();

        for (int i = 0; i < 5; i++)
        {
            AddItem(30001, Shop1ScrollRect);
            AddItem(30002, Shop1ScrollRect);
            AddItem(30003, Shop1ScrollRect);
        }

        for (int i = 0; i < 5; i++)
        {
            AddItem(30003, Shop2ScrollRect);
            AddItem(30002, Shop2ScrollRect);
            AddItem(30001, Shop2ScrollRect);
        }


        moneyTxt.text = "보유골드 : " + money.ToString();
    }
示例#2
0
 private void Awake()
 {
     if (instance != null)
     {
         Destroy(this.gameObject);
     }
     else
     {
         instance = this;
         DontDestroyOnLoad(this.transform.gameObject);
     }
 }
 private void Awake()
 {
     if (instance != null)
     {
         Destroy(this.gameObject);
     }
     else
     {
         instance = this;
         DontDestroyOnLoad(this.transform.gameObject);
     }
     // ---------------
     inventory_Panel      = GameObject.Find("Inventory_Panel");
     inventory_Slot_Panel = inventory_Panel.transform.Find("Slot_Panel").gameObject;
     item_DataBase        = GameObject.Find("Inventory_Json_Data").GetComponent <Item_Json_DataBase>();
 }