Exemple #1
0
 public IEnumerator Trading(ItemCollector item, DropStockArea stock)
 {
     while (trading)
     {
         yield return(new WaitForEndOfFrame());
     }
     Debug.Log("Trade " + item.Item.ItemName + " to " + number);
     stock.Trade(number);
     Cancel();
 }
Exemple #2
0
    public void StartTrade(ItemCollector item, DropStockArea stock)
    {
        if (item == null || stock == null || Number == null)
        {
            return;
        }

        Number.text = item.Num.ToString();
        trading     = true;
        this.gameObject.SetActive(true);
        StartCoroutine(Trading(item, stock));
    }
 void Start()
 {
     dropArea = this.GetComponent <DropStockArea>();
 }