Exemplo n.º 1
0
    private void OnTriggerEnter(Collider other)
    {
        if (other.tag == Tags.ManaPotion)
        {
            manaPotions++;

            if (Notification != null)
            {
                Notification.Notify("You picked up a mana potion!");
            }

            if (GameSceneManager != null)
            {
                GameSceneManager.PickupPotion(other.gameObject);
            }
        }
    }
Exemplo n.º 2
0
    private void OnTriggerEnter(Collider other)
    {
        switch (other.tag)
        {
        case Tags.ManaPotion:
            manaPotions++;

            if (Notification != null)
            {
                Notification.Notify("You picked up a mana potion!");
            }

            if (GameSceneManager != null)
            {
                GameSceneManager.PickupPotion(other.gameObject);
            }

            break;

        case Tags.ExitZone:
            GameSceneManager.EndConditionSatisfied(GameSceneManager.EndCondition.WinPlayerEscape);
            break;
        }
    }