public void OnConfigLoadEnd() { new SkillHandler(); ConfigTable tbl = ConfigData.GetValue("InitValues_Common"); string[] slideDis = tbl.GetValue("FIGHT_SLIDE", "Value").Split(','); fFightSlideMin = int.Parse(slideDis[0]); fFightSlideMax = int.Parse(slideDis[1]); fBackwardCD = float.Parse(tbl.GetValue("BACKWARD_CD", "Value")); }
private void LoadSkillEffect() { int skillId; string path; Transform trans; for (int i = 0; i < _charHandler.m_CharData.SkillIDs.Length; ++i) { skillId = _charHandler.m_CharData.SkillIDs[i]; if (0 == skillId) { break; } path = _skillEffectConfig.GetValue(skillId.ToString(), "EffectPath"); if (null != path && !path.Equals(string.Empty)) { GameObject go = ResourceLoader.LoadAssetAndInstantiate(path, _transform); trans = go.transform; trans.localScale = go.transform.localScale / _charHandler.m_ParentTrans.localScale.z; trans.rotation = _charHandler.m_ParentTrans.rotation; go.SetActive(false); _dicSkillEffect.Add(skillId, new SkillEffectStruct(go)); } } }
public CharHandler PopMonsterHandler(int monsterId) { if (!_dicMonsterPool.ContainsKey(monsterId)) { _dicMonsterPool.Add(monsterId, new Stack <CharHandler>()); } if (_dicMonsterPool[monsterId].Count > 0) { return(_dicMonsterPool[monsterId].Pop()); } else { GameObject go = ResourceLoader.LoadAssetAndInstantiate(_monsterConfig.GetValue(monsterId.ToString(), "PrefabPath"), _transform, PositionMgr.vecHidePos); CharHandler ch = LoaderMonster(go, monsterId); return(ch); } }
public static string GetValue(string sKey1, string sKey2, string sKey3) { ConfigTable tbl = m_ConfigData[sKey1]; return(tbl.GetValue(sKey2, sKey3)); }
private void LoadCommonEffect() { _dizzyEffect = ResourceLoader.LoadAssetAndInstantiate(_skillEffectGeneralConfig.GetValue("1", "Path"), _transform, dizzyPos); _dizzyEffect.transform.localScale = _dizzyEffect.transform.localScale / _charHandler.m_ParentTrans.localScale.z; _dizzyEffect.SetActive(false); }