Example #1
0
    private void DestroyAppleOnFall()
    {
        if (this.transform.position.y < MAXFALLPOINT)
        {
            Destroy(this.gameObject);

            ApplePicker applePickerRef = GameObject.FindGameObjectWithTag("GM").GetComponent <ApplePicker>();
            applePickerRef.SubtractLife();
        }
    }