Esempio n. 1
0
    public override void OnLookupUpdate(string dataID, object value)
    {
        base.OnLookupUpdate(dataID, value);
        if (value == null)
        {
            return;
        }

        Dictionary <string, string> .Enumerator enumerator = m_EquipmentRegisterIDs.GetEnumerator();
        while (enumerator.MoveNext())
        {
            KeyValuePair <string, string> current = enumerator.Current;
            AvatarComponent avatar     = GetComponent <AvatarComponent>();
            int             colorIndex = 0;
            if (dataID == enumerator.Current.Value)
            {
                if (int.TryParse(value.ToString(), out colorIndex))
                {
                    if (avatar != null)
                    {
                        avatar.UpdateEquipmentColor(current.Key, colorIndex - 1);
                    }
                }
            }
        }
    }