public void SetHurt(string name, int hurt) { ItemEntityHp itemHp = null; if (itemHpDicts.TryGetValue(name, out itemHp)) { itemHp.SetHurt(hurt); } }
public void SetHurt(string key, int hurt) { ItemEntityHp item = null; if (hpItemDic.TryGetValue(key, out item) == true) { item.SetHurt(hurt); } }