Пример #1
0
 // Update is called once per frame
 void Update()
 {
     if (this.transform.position.y < limitDown)
     {
         Destroy(this.gameObject);
         script.LoseLife();
     }
 }
Пример #2
0
    // Update is called once per frame
    void Update()
    {
        if (transform.position.y <= bottomY)
        {
            Destroy(this.gameObject);

            ApplePicker apScript = Camera.main.GetComponent <ApplePicker>();

            apScript.LoseLife();
        }
    }