public void SetDodge(string key) { ItemEntityHP item = null; if (itemDic.TryGetValue(key, out item)) { item.SetDodge(); } }
private void SetDodge(object sender, GameEventArgs e) { SetDodgeEventArgs ne = e as SetDodgeEventArgs; ItemEntityHP item = null; if (itemDic.TryGetValue(ne.Name, out item)) { item.SetDodge(); } }