public void SetSkillConfigs(SkillConfig[] configs) { if (configs == null) { this.skillConfigsDic = new Dictionary<int, SkillConfig>(); } else { if (f_am_cacheE == null) { f_am_cacheE = n => n.skillId; } if (f_am_cacheF == null) { f_am_cacheF = n => n; } this.skillConfigsDic = configs.ToDictionary<SkillConfig, int, SkillConfig>(f_am_cacheE, f_am_cacheF); } }