public void statsonClick() { augmonbuttons = new List <ButtonContainer> (); //get and close navdrawer navdrawer = GameObject.Find("Nav Drawer").GetComponent <NavDrawerConfig> (); navdrawer.Close(); //declare database database = new DAO(); getStats(); //pause to avoid stain Invoke("displayStats", 1); StartCoroutine(pause()); }
// Update is called once per frame void Update() { float length = Mathf.Abs(endPosition - startPosition); int delta = FeaturePedometer.Instance().stepCnt; steptext.text = "Steps - " + ((pedometersteps + delta) % 100) + "%"; length = length * (((pedometersteps + delta) % 100) / 100); if ((int)startPosition > (int)endPosition) { rTrans.anchoredPosition = new Vector2(startPosition - length, rTrans.anchoredPosition.y); } if ((int)startPosition < (int)endPosition) { rTrans.anchoredPosition = new Vector2(startPosition + length, rTrans.anchoredPosition.y); } NavDrawerConfig config = GameObject.Find("Nav Drawer").GetComponent <NavDrawerConfig> (); if (config.isClosed() && !isClosed) { stepsOnClick(); } }