Пример #1
0
    public void SetHurt(string key, int hurt)
    {
        ItemEntityHP item = null;

        if (itemDic.TryGetValue(key, out item))
        {
            item.SetHurt(hurt);
        }
    }
Пример #2
0
    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);
        }
    }