Exemplo n.º 1
0
    public static Talisman Creat(TalismanItem sourseItem, int countTalismans)
    {
        Talisman talic = null;
        switch (sourseItem.TalismanType)
        {
            case TalismanType.speed:
                talic = new TalismanSpeed(sourseItem,countTalismans);
                break;
            case TalismanType.massPush:

                break;
            case TalismanType.firewave:
                talic = new TalismanFireWave(sourseItem, countTalismans);
                break;
            case TalismanType.massFreez:
                talic = new TalismanMassFreez(sourseItem, countTalismans);
                break;
            case TalismanType.heal:
                talic = new TalismanHeal(sourseItem, countTalismans);
                break;
            case TalismanType.doubleDamage:
                talic = new TalismanDoubleDamage(sourseItem, countTalismans);
                break;
            case TalismanType.chain:
                talic = new TalismanChain(sourseItem, countTalismans);
                break;
            case TalismanType.energyVamp:
                talic = new TalismanEnergyVamp(sourseItem, countTalismans);
                break;
            case TalismanType.bloodDamage:
                talic = new TalismanBloodDamage(sourseItem, countTalismans);
                break;
            case TalismanType.trapAOE:
                talic = new TalismanTrapAOE(sourseItem, countTalismans);
                break;
            case TalismanType.trapDamage:
                talic = new TalismanTrapDamage(sourseItem, countTalismans);
                break;
            case TalismanType.trapFreez:
                talic = new TalismanTrapFreez(sourseItem, countTalismans);
                break;
            case TalismanType.cleave:
                talic = new TalismanCleave(sourseItem, countTalismans);
                break;
        }
        return talic;
    }
Exemplo n.º 2
0
    public static Talisman Creat(TalismanItem sourseItem, int countTalismans, Level level)
    {
        Talisman talic = null;
        switch (sourseItem.TalismanType)
        {
            case TalismanType.massPush:
                //
                break;
            case TalismanType.splitter:
                talic = new TalismanSplitter();
                break;
            case TalismanType.firewave:
                talic = new TalismanFireWave();
                break;
            case TalismanType.massFreez:
//                talic = new TalismanMassFreez(sourseItem, countTalismans);
                break;
            case TalismanType.heal:
                talic = new TalismanHeal();
                break;
            case TalismanType.doubleDamage:
                talic = new TalismanDoubleDamage();
                break;
            case TalismanType.chain:
                talic = new TalismanChain();
                break;
            case TalismanType.energyVamp:
//                talic = new TalismanEnergyVamp(sourseItem, countTalismans);
                break;
            case TalismanType.bloodDamage:
                talic = new TalismanBloodDamage();
                break;
            case TalismanType.trapAOE:
                talic = new TalismanTrapAOE();
                break;
            case TalismanType.trapDamage:
                talic = new TalismanTrapDamage();
                break;
            case TalismanType.trapFreez:
                talic = new TalismanTrapFreez();
                break;
            case TalismanType.megaArmor:
                talic = new TalismanArmor();
                break;

        }
        if (talic == null)
        {
            Debug.LogError("Talic creat error:" + sourseItem.TalismanType);
        }
        talic.Init(level,sourseItem,countTalismans);
        return talic;
    }