Example #1
0
    void Update()
    {
        if (transform.position.y < bottomY)
        {
            Destroy(this.gameObject);

            ApplePicker apScript = Camera.main.GetComponent <ApplePicker>();//here we got the link from the main camera
            apScript.AppleDesroyed();
        }
    }