public void SetCritical(string key, int critical) { ItemEntityHP item = null; if (itemDic.TryGetValue(key, out item)) { item.SetCritical(critical); } }
private void SetCritical(object sender, GameEventArgs e) { SetCriticalEventArgs ne = e as SetCriticalEventArgs; ItemEntityHP item = null; if (itemDic.TryGetValue(ne.Name, out item)) { item.SetCritical(ne.Critical); } }