예제 #1
0
    public void Execute()
    {
        BuffSlidingUI bSUI = Camera.mainCamera.GetComponent<BuffSlidingUI>();
        IList atkList = new List<Transform>();
        Transform localMap = aider.GetComponent<CharacterSelect>().getMapPosition();
        Transform[] attackableMaps = localMap.GetComponent<Identy>().neighbor;
        foreach(Transform unit in attackableMaps){
            if((unit!=null) && MapHelper.IsMapOccupied(unit)){
                Transform character = MapHelper.GetMapOccupiedObj(unit);
                if(character.GetComponent<CharacterProperty>().Player == aider.GetComponent<CharacterProperty>().Player)
                    atkList.Add(character);
            }
        }

        if(atkList.Count>0){
            foreach(Transform target in atkList){
                // update data
                target.GetComponent<BuffList>().ExtraDict[BuffType.Defense] += 1;
                target.GetComponent<BuffList>().ExtraDict[BuffType.Attack] += 1;
                BuffCalculation buffCal = new BuffCalculation(target);
                buffCal.UpdateBuffValue();
                //show Visual UI
                Dictionary<BuffType,int> dict = new Dictionary<BuffType, int>();
                dict.Add(BuffType.Defense, 1);
                dict.Add(BuffType.Attack, 1);
                BuffUI bUI = new BuffUI(target,dict);
                bSUI.UIItems.Add(bUI);
                MapHelper.SetFX(target,fxBuffAtk,4.0f);
                MapHelper.SetFX(target,fxBuffDef,4.0f);
            }
        }
        bSUI.FadeInUI = true;
    }
예제 #2
0
 public void Execute()
 {
     aider.GetComponent<CharacterPassive>().PassiveDict[PassiveType.Flying] = false;
     BuffCalculation bCal = new BuffCalculation(aider);
     switch(mode){
         case PowerType.Critical:
             aider.GetComponent<BuffList>().ExtraDict[BuffType.CriticalHit] += Value;
             bCal.UpdateBuffValue();
             break;
         case PowerType.Damage:
             aider.GetComponent<BuffList>().ExtraDict[BuffType.Attack] += Value;
             bCal.UpdateBuffValue();
             break;
         case PowerType.Hp:
             aider.GetComponent<BuffList>().ExtraDict[BuffType.Defense] += Value;
             bCal.UpdateBuffValue();
             break;
         case PowerType.SkillRate:
             aider.GetComponent<BuffList>().ExtraDict[BuffType.SkillRate] += Value;
             bCal.UpdateBuffValue();
             break;
         case PowerType.MoveRange:
             aider.GetComponent<BuffList>().ExtraDict[BuffType.MoveRange] += Value;
             bCal.UpdateBuffValue();
             break;
         case PowerType.AttackRange:
             aider.GetComponent<BuffList>().ExtraDict[BuffType.AttackRange] += Value;
             bCal.UpdateBuffValue();
             break;
     }
 }
 public void Execute()
 {
     BuffSlidingUI bSUI = Camera.mainCamera.GetComponent<BuffSlidingUI>();
     aider.GetComponent<CharacterPassive>().PassiveDict[mode] = true;
     BuffCalculation bCal = new BuffCalculation(aider);
     foreach(var pair in PowerList){
         switch(pair.Key){
             case PowerType.Critical:
                 aider.GetComponent<BuffList>().ExtraDict[BuffType.CriticalHit] += pair.Value;
                 BuffVisualUI(BuffType.CriticalHit, pair.Value, bSUI);
                 MapHelper.SetFX(aider,fxBuffCritiq,4.0f);
                 bCal.UpdateBuffValue();
                 break;
             case PowerType.Damage:
                 aider.GetComponent<BuffList>().ExtraDict[BuffType.Attack] += pair.Value;
                 BuffVisualUI(BuffType.Attack, pair.Value, bSUI);
                 MapHelper.SetFX(aider,fxBuffAtk,4.0f);
                 bCal.UpdateBuffValue();
                 break;
             case PowerType.Hp:
                 aider.GetComponent<BuffList>().ExtraDict[BuffType.Defense] += pair.Value;
                 BuffVisualUI(BuffType.Defense, pair.Value, bSUI);
                 MapHelper.SetFX(aider,fxBuffDef,4.0f);
                 bCal.UpdateBuffValue();
                 break;
             case PowerType.SkillRate:
                 aider.GetComponent<BuffList>().ExtraDict[BuffType.SkillRate] += pair.Value;
                 BuffVisualUI(BuffType.SkillRate, pair.Value, bSUI);
                 MapHelper.SetFX(aider,fxBuffSkill,4.0f);
                 bCal.UpdateBuffValue();
                 break;
             case PowerType.MoveRange:
                 aider.GetComponent<BuffList>().ExtraDict[BuffType.MoveRange] += pair.Value;
                 BuffVisualUI(BuffType.MoveRange, pair.Value, bSUI);
                 MapHelper.SetFX(aider,fxBuffMove,4.0f);
                 bCal.UpdateBuffValue();
                 break;
             case PowerType.AttackRange:
                 aider.GetComponent<BuffList>().ExtraDict[BuffType.AttackRange] += pair.Value;
                 BuffVisualUI(BuffType.AttackRange, pair.Value, bSUI);
                 MapHelper.SetFX(aider,fxBuffRange,4.0f);
                 bCal.UpdateBuffValue();
                 break;
         }
     }
 }
예제 #4
0
 public void Execute()
 {
     BuffCalculation bCal = new BuffCalculation(target);
     BuffSlidingUI bSUI = Camera.mainCamera.GetComponent<BuffSlidingUI>();
     switch(mode){
         case PowerType.Critical:
             target.GetComponent<BuffList>().ExtraDict[BuffType.CriticalHit] += Value;
             BuffVisualUI(BuffType.CriticalHit, Value, bSUI);
             MapHelper.SetFX(target,fxBuffCritiq,4.0f);
             bCal.UpdateBuffValue();
             break;
         case PowerType.Damage:
             target.GetComponent<BuffList>().ExtraDict[BuffType.Attack] += Value;
             BuffVisualUI(BuffType.Attack, Value, bSUI);
             MapHelper.SetFX(target,fxBuffAtk,4.0f);
             bCal.UpdateBuffValue();
             break;
         case PowerType.Hp:
             target.GetComponent<BuffList>().ExtraDict[BuffType.Defense] += Value;
             BuffVisualUI(BuffType.Defense, Value, bSUI);
             MapHelper.SetFX(target,fxBuffDef,4.0f);
             bCal.UpdateBuffValue();
             break;
         case PowerType.SkillRate:
             target.GetComponent<BuffList>().ExtraDict[BuffType.SkillRate] += Value;
             BuffVisualUI(BuffType.SkillRate, Value, bSUI);
             MapHelper.SetFX(target,fxBuffSkill,4.0f);
             bCal.UpdateBuffValue();
             break;
         case PowerType.MoveRange:
             target.GetComponent<BuffList>().ExtraDict[BuffType.MoveRange] += Value;
             BuffVisualUI(BuffType.MoveRange, Value, bSUI);
             MapHelper.SetFX(target,fxBuffMove,4.0f);
             bCal.UpdateBuffValue();
             break;
         case PowerType.AttackRange:
             target.GetComponent<BuffList>().ExtraDict[BuffType.AttackRange] += Value;
             BuffVisualUI(BuffType.AttackRange, Value, bSUI);
             MapHelper.SetFX(target,fxBuffRange,4.0f);
             bCal.UpdateBuffValue();
             break;
     }
 }