void goMove() { float d = bc.getScore(); //Debug.Log ("delay = "+bc.timeSinceLastTick ()); //this.changeColor(d); anim.SetBool("change", true); sound.Play(); }
// Update is called once per frame void Update() { if (Input.GetKey(KeyCode.Space)) { float d = bc.getScore(); this.changeColor(d); cpt = 0; } cpt++; if (cpt > 10) { this.renderer.material.color = new Color(0, 0, 0); cpt = 0; } }