Exemple #1
0
    async public void onClickYes()
    {
        GameObject.Find("inventorySystem").GetComponent <CreateAssetInShop>().sellCount--;
        sellscript = GameObject.Find("GameObject").GetComponent <CreateAssetByNameShop>();
        await sellscript.sellWeapon();

        Destroy(this.transform.parent.gameObject);
    }
Exemple #2
0
    public void onClickSellSlot()//판매입력을 처리할 스크립트 버튼 부

    {
        if (GameObject.Find("inventorySystem").GetComponent <CreateAssetInShop>().sellCount < 2)
        {
            Instantiate(sellCancel, GameObject.Find("CheckLocal").transform, false);
        }
        else
        {
            Instantiate(checkbox, GameObject.Find("CheckLocal").transform, false);
            objname      = this.name;
            tmp1         = this.name.Substring(5);
            this.tmpname = tmp1.Split(new string[] { "-" }, System.StringSplitOptions.None);
            Debug.Log(tmpname[0]);
            this.sellname          = this.tmpname[0];
            sellscript             = GameObject.Find("GameObject").GetComponent <CreateAssetByNameShop>();
            sellscript.sellgunname = sellname;
            sellscript.destroyName = objname;
        }
    }
 public void Start()
 {
     shopScript = GameObject.Find("GameObject").GetComponent <CreateAssetByNameShop>();
 }