public void SetHurt(string key, int hurt) { ItemEntityHP item = null; if (itemDic.TryGetValue(key, out item)) { item.SetHurt(hurt); } }
private void SetHurt(object sender, GameEventArgs e) { SetHurtEventArgs ne = e as SetHurtEventArgs; ItemEntityHP item = null; if (itemDic.TryGetValue(ne.Name, out item)) { item.SetHurt(ne.Hurt); } }