Beispiel #1
0
    public void AddElement(EElementType type)
    {
        BodyElementData local1 = this.ElementColor[type];

        local1.count++;
        if (!this.bHittedColor)
        {
            this.UpdateElement();
        }
    }
Beispiel #2
0
    public void RemoveElement(EElementType type)
    {
        BodyElementData data = this.ElementColor[type];

        data.count--;
        if ((data.count == 0) && !this.bHittedColor)
        {
            this.mShaderBase.ReturnToDefault();
        }
    }
Beispiel #3
0
    public BodyMask()
    {
        Dictionary <EElementType, BodyElementData> dictionary = new Dictionary <EElementType, BodyElementData>();
        BodyElementData data = new BodyElementData {
            color = new Color(1f, 0.227451f, 0f)
        };

        dictionary.Add(EElementType.eFire, data);
        data = new BodyElementData {
            color = new Color(0f, 0.7098039f, 1f)
        };
        dictionary.Add(EElementType.eIce, data);
        this.ElementColor = dictionary;
        this.mHeadTopList = new Dictionary <int, GameObject>();
        this.mHeadIDs     = new List <int>();
    }
Beispiel #4
0
    private void UpdateElement()
    {
        Dictionary <EElementType, BodyElementData> .Enumerator enumerator = this.ElementColor.GetEnumerator();
        bool flag = false;

        while (enumerator.MoveNext())
        {
            KeyValuePair <EElementType, BodyElementData> current = enumerator.Current;
            BodyElementData data = current.Value;
            if (data.count > 0)
            {
                this.mShaderBase.SetElement(data.color);
                flag = true;
                break;
            }
        }
        if (!flag)
        {
            this.mShaderBase.ReturnToDefault();
        }
    }