Ejemplo n.º 1
0
                          public void activateSkill(IPlayable player)
                          {
                              if (SKILL_TYPE == "NONE")
                              {
                                  return;
                              }

                              var activeNames = Enum.GetNames(typeof(ActiveSkillType));

                              foreach (string name in activeNames)
                              {
                                  if (name == SKILL_TYPE)
                                  {
                                      ActiveSkillType type  = (ActiveSkillType)Enum.Parse(typeof(ActiveSkillType), SKILL_TYPE);
                                      IActiveSkill    skill = ActiveSkillSupporter.getActiveSkill(type, SKILL_ID);
                                      player.addSkill(skill);
                                      return;
                                  }
                              }

                              if (SKILL_TYPE == "REACTION")
                              {
                                  player.addSkill(ReactionSkillMasterManager.getInstance().getReactionSkillFromId(SKILL_ID));
                                  return;
                              }

                              throw new InvalidProgramException("SkillType " + SKILL_TYPE + "wan't found");
                          }
Ejemplo n.º 2
0
        public List <IActiveSkill> getActiveSkills()
        {
            List <IActiveSkill> skills = new List <IActiveSkill>();

            foreach (var idSet in activeSkillIds)
            {
                skills.Add(ActiveSkillSupporter.getActiveSkill(idSet.Key, idSet.Value));
            }

            return(skills);
        }
Ejemplo n.º 3
0
 public void use(IPlayable user)
 {
     if (IS_REACTIONSKILL)
     {
         var reactionSkill = ReactionSkillMasterManager.getInstance().getReactionSkillFromId(SKILL_ID);
         user.addSkill(reactionSkill);
     }
     else
     {
         var activeSkill = ActiveSkillSupporter.getActiveSkill(SKILL_TYPE, SKILL_ID);
         user.addSkill(activeSkill);
     }
 }