Ejemplo n.º 1
0
 void Update()
 {
     if (Input.GetKey(KeyCode.Space) || Input.GetMouseButtonDown(0))
     {
         Destroy(gameObject);
         GameObject bird         = GameObject.Find("Blue_Bird3");
         birdMove   targetScript = bird.GetComponent <birdMove>();
         targetScript.start = true;
     }
 }
Ejemplo n.º 2
0
    // Update is called once per frame
    void Update()
    {
        GameObject bird         = GameObject.Find("Blue_Bird3");
        birdMove   targetScript = bird.GetComponent <birdMove>();

        start1 = targetScript.start;

        if (start1)
        {
            Vector3 coord = transform.position;
            coord.z            = 0;
            transform.position = coord;
        }
    }
Ejemplo n.º 3
0
    // Update is called once per frame
    void Update()
    {
        if (!dead1)
        {
            Vector3 pos = transform.position;
            pos.x -= 0.1f;
            transform.position = pos;

            if (transform.position.x <= -13)
            {
                Vector3 pos1 = transform.position;
                pos1.x             = 13;
                transform.position = pos1;
            }
            GameObject bird         = GameObject.Find("Blue_Bird3");
            birdMove   targetScript = bird.GetComponent <birdMove>();
            dead1 = targetScript.dead;
        }
    }
Ejemplo n.º 4
0
    // Update is called once per frame
    void Update()
    {
        //t.text = "Score" + score;
        GetComponent <TextMesh>().text = "Score : " + score;
        GameObject bird         = GameObject.Find("Blue_Bird3");
        birdMove   targetScript = bird.GetComponent <birdMove>();

        dead1 = targetScript.dead;

        if (dead1)
        {
            GetComponent <TextMesh>().text = "        RIP \n" + "    Score : " + score;

            Vector3 pos = transform.position;
            pos.x = -1;
            pos.y = 0.5f;
            transform.position              = pos;
            GetComponent <TextMesh>().text += "\n Tap to Restart";
        }
    }
Ejemplo n.º 5
0
    // Update is called once per frame
    void Update()
    {
        GameObject bird         = GameObject.Find("Blue_Bird3");
        birdMove   targetScript = bird.GetComponent <birdMove>();

        start1 = targetScript.start;
        if (!dead1 && start1)
        {
            Vector3 pos = transform.position;
            pos.x -= v1 * Time.deltaTime;
            transform.position = pos;

            if (transform.position.x <= -15)
            {
                Vector3 pos1 = transform.position;
                pos1.x             = coordinate.x;
                transform.position = pos1;
            }
            dead1 = targetScript.dead;
        }
    }