Example #1
0
    private void OnTriggerEnter2D(Collider2D other)
    {
        Adventurer enemy = other.GetComponent <Adventurer>();

        if (enemy == null)
        {
            return;
        }

        if (HungerList.Contains(enemy.type))
        {
            enemy.GetConsumed(this);
            OnChomp();
            HungerList.Remove(enemy.type);
            bubble.Populate(this);
        }
        else
        {
            enemy.AttackSteve(this);
        }
    }