Exemple #1
0
    private void OnTriggerEnter2D(Collider2D collision)
    {
        BugAI bug = collision.GetComponent <BugAI>();

        if (bug != null)
        {
            bug.Kill();
        }
    }
    private void OnTriggerEnter2D(Collider2D collision)
    {
        BugAI bug = collision.GetComponent <BugAI>();

        if (bug != null)
        {
            Sprite imageToUse = bug.GetComponentInChildren <SpriteRenderer>().sprite;
            bug.Kill();
            EatenBugs++;
            float stomachIndex = (float)EatenBugs / StomachCapacity;
            GameManager.I.UICtrl.StomachAdd(imageToUse, stomachIndex);

            frog.EatFeedback();
        }
    }
Exemple #3
0
 public void ReturnBugToPull(BugAI _bug)
 {
     bugsPull.Add(_bug);
     bugsActive.Remove(_bug);
     _bug.gameObject.SetActive(false);
 }