Exemple #1
0
    IEnumerator waitandaddrequest(Collider other)
    {
        Vuforia.RetailItemScript productinfo = other.gameObject.transform.parent.GetComponent <Vuforia.RetailItemScript>();
        yield return(new WaitForSeconds(1));

        addDataToBar(productinfo.GetProductName(), productinfo.GetSales());
    }
Exemple #2
0
    void OnTriggerExit(Collider other)
    {
        AddBarData myBarScript = myBarchart.GetComponent <AddBarData>();

        Vuforia.RetailItemScript productinfo = other.gameObject.transform.parent.GetComponent <Vuforia.RetailItemScript>();
        myBarScript.RemoveCategory(productinfo.GetProductName());
        if (myBarScript.getAmountOfCategories() == 0)
        {
            ShowBarChart = false;
            myBarchart.SetActive(false);
        }
        Debug.Log("SUCCESS Removed");
    }
Exemple #3
0
    void OnTriggerEnter(Collider other)
    {
        if (ShowBarChart == false)
        {
            ShowBarChart = true;
            myBarchart.SetActive(true);
        }

        Vuforia.RetailItemScript productinfo = other.gameObject.transform.parent.GetComponent <Vuforia.RetailItemScript>();
        if (productinfo.GetProductName() == "")
        {
            productinfo.filtProd();
            waitandaddrequest(other);
        }
        else
        {
            addDataToBar(productinfo.GetProductName(), productinfo.GetSales());
        }
    }