Ejemplo n.º 1
0
        public bool GetSkillModel(string skillId, out SkillModel model)
        {
            if (skillModelCache.ContainsKey(skillId))
            {
                model = skillModelCache[skillId];
                return(true);
            }
            string jsonStr = LoadHelper.LoadString(SkillDef.GetSkillCnfName(skillId));

            if (string.IsNullOrEmpty(jsonStr))
            {
                model = default;
                return(false);
            }
            model = JsonMapper.ToObject <SkillModel>(jsonStr);
            skillModelCache.Add(skillId, model);
            return(true);
        }
Ejemplo n.º 2
0
 public SkillObj(SkillModel model, int level)
 {
     this.model    = model;
     this.level    = level;
     this.coldDown = 0;
 }