Пример #1
0
    void goMove()
    {
        float d = bc.getScore();

        //Debug.Log ("delay = "+bc.timeSinceLastTick ());
        //this.changeColor(d);

        anim.SetBool("change", true);
        sound.Play();
    }
Пример #2
0
    // 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;
        }
    }