Esempio n. 1
0
    public void  DestroyBlocks()
    {
        blockNum--;

        if (blockNum <= 0)
        {
            loadScene.LoadNextScene();
        }
    }
    void Update()
    {
        transform.position = Vector3.Lerp(transform.position, new Vector3(-1000f, transform.position.y, transform.position.z), Time.deltaTime * 20f);
        GameObject.Find("Audio Source").GetComponent <AudioSource>().Play();

        if (transform.position.x >= -200f)
        {
            obj.LoadNextScene();
        }
    }