Пример #1
0
 private void OnTriggerEnter2D(Collider2D other)
 {
     if (other.gameObject.CompareTag("Crop") && other.gameObject.name == target.gameObject.name && !killBird)
     {
         //landed = true;
         targetedLand.setContestedStatus(true);
         crowRenderer.sprite = sprLanded;
         StartCoroutine(harmCrop());
     }
 }
Пример #2
0
    IEnumerator harmCrop()
    {
        targetedLand.setContestedStatus(true);
        yield return(new WaitForSeconds(delay));

        if (!killBird)
        {
            targetedLand.harvestDestroy();
        }
        cropDestroyed = true;
        targetedLand.setContestedStatus(false);
    }