Ejemplo n.º 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());
     }
 }
Ejemplo n.º 2
0
    IEnumerator harmCrop()
    {
        targetedLand.setContestedStatus(true);
        yield return(new WaitForSeconds(delay));

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