public SkillMap.Score[] GetScores(int x, int y) { List <SkillMap.Score> scoreList = new List <SkillMap.Score>(); using (Dictionary <int, SkillMap.Target> .Enumerator enumerator = this.targets.GetEnumerator()) { while (enumerator.MoveNext()) { SkillMap.Score score = enumerator.Current.Value.Get(x, y); if (score != null) { scoreList.Add(score); } } } return(scoreList.ToArray()); }
public SkillMap.Score Get(int x, int y) { SkillMap.Score score = (SkillMap.Score)null; this.scores.TryGetValue(SkillMap.GetHash(x, y), out score); return(score); }
public void Add(SkillMap.Score score) { this.scores[SkillMap.GetHash(score.pos.x, score.pos.y)] = score; }