public void LoadSkillText(string text) { ScriptableDataFile dataFile = new ScriptableDataFile(); #if DEBUG if (dataFile.LoadFromString(text, "skill")) { Load(dataFile); } #else dataFile.LoadObfuscatedCode(text, GlobalVariables.Instance.DecodeTable); Load(dataFile); #endif }
public void LoadSkill(string file) { if (!string.IsNullOrEmpty(file)) { ScriptableDataFile dataFile = new ScriptableDataFile(); #if DEBUG if (dataFile.Load(file)) { Load(dataFile); } #else dataFile.LoadObfuscatedFile(file, GlobalVariables.Instance.DecodeTable); Load(dataFile); #endif } }
private void Load(ScriptableDataFile dataFile) { lock (m_Lock) { foreach (ScriptableDataInfo info in dataFile.ScriptableDatas) { if (info.GetId() == "skill") { FunctionData funcData = info.First; if (null != funcData) { CallData callData = funcData.Call; if (null != callData && callData.HaveParam()) { int id = int.Parse(callData.GetParamId(0)); if (!m_SkillInstances.ContainsKey(id)) { SkillInstance instance = new SkillInstance(); instance.Init(info); m_SkillInstances.Add(id, instance); Logger.Info("ParseSkill {0}", id); } else { //repeated skill config. } } } } } } }