Esempio n. 1
0
 public void Init(TalismanChain sourseItem, Hero hero,int targetsCount)
 {
     power = sourseItem.Power;
     transform.position = hero.transform.position;
     if (hitEffect != null)
     {
         hitEffect.Stop();
     }
     maxTargets = targetsCount;
     timer = MainController.Instance.TimerManager.MakeTimer(TimeSpan.FromMilliseconds(800), true);
     timer.OnTimer += OnTimer;
     StartCoroutine(Wait1Frame());
 }
Esempio n. 2
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;
    }
Esempio n. 3
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;
    }