Esempio n. 1
0
    public void Update()
    {
        if (Input.GetMouseButtonDown(0))
        {
            Vector3 mousePosition = Input.mousePosition;
            mousePosition.z = 0;

            if (m_Collider.bounds.Contains(Camera.main.ScreenToWorldPoint(mousePosition)))
            {
                m_Store.BuyItem(m_ItemToSell);
                Debug.Log("BUY");
            }
        }
    }