public void SetHPVal(string key, int oldVal, int newVal) { ItemEntityHP item = null; if (itemDic.TryGetValue(key, out item)) { item.SetHPVal(oldVal, newVal); } }
private void SetHPVal(object sender, GameEventArgs e) { SetHPValEventArgs ne = e as SetHPValEventArgs; ItemEntityHP item = null; if (itemDic.TryGetValue(ne.Name, out item)) { item.SetHPVal(ne.OldVal, ne.NewVal); } }