Exemple #1
0
    public void PotionEffect(GameObject Player, int itemID)
    {
        CharacterStat stat_temp = Player.GetComponent <CharacterStat>();

        switch (itemID)
        {
        case 20001:
            stat_temp.GetHeal(1000, Player);
            break;

        case 20002:
            stat_temp.GetHeal(2000, Player);
            break;

        case 20003:
            stat_temp.GetHeal(3000, Player);
            break;

        case 20004:
            stat_temp.GetHeal(3000, Player);
            break;

        case 20005:
            stat_temp.GetHeal(3000, Player);
            break;

        case 20006:
            stat_temp.GetMana(1000);
            break;

        case 20007:
            stat_temp.GetMana(2000);
            break;

        case 20008:
            stat_temp.GetMana(3000);
            break;

        case 20009:
            stat_temp.GetMana(4000);
            break;

        case 20010:
            stat_temp.GetMana(5000);
            break;

        case 20011:
            StartCoroutine(BuffPotion_Delay(15, stat_temp, 100, 20011));
            break;

        case 20012:
            StartCoroutine(BuffPotion_Delay(15, stat_temp, 100, 20012));
            break;

        case 20013:
            StartCoroutine(BuffPotion_Delay(15, stat_temp, 100, 20013));
            break;

        case 20014:
            StartCoroutine(BuffPotion_Delay(15, stat_temp, 100, 20014));
            break;

        case 20015:
            StartCoroutine(BuffPotion_Delay(15, stat_temp, 40, 20015));
            break;

        case 20016:
            StartCoroutine(BuffPotion_Delay(15, stat_temp, 30, 20016));
            break;

        case 20017:
            StartCoroutine(BuffPotion_Delay(15, stat_temp, 30, 20017));
            break;

        case 20018:
            StartCoroutine(BuffPotion_Delay(3, stat_temp, 100, 20018));
            break;
        }
    }