Exemplo n.º 1
0
 public void UpgradeElementExtraAttribute(float value, int order)
 {
     if (WeaponElement != WeaponElementType.Null)
     {
         int num = Convert.ToInt32(Enum.Parse(typeof(WeaponElementType), WeaponElement.ToString())) +
                   (order - 1) * DataConstraint.ElementMaxSize;
         if (num > 0 && num <= Enum.GetValues(typeof(ElementExtraAttribute)).Length)
         {
             string        extra = Enum.GetName(typeof(ElementExtraAttribute), num);
             AttributeCode attr  = (AttributeCode)Enum.Parse(typeof(AttributeCode), extra);
             ElementAttributes.Value[attr] = ElementAttributes.Value[attr] + value;
         }
     }
 }
Exemplo n.º 2
0
    void TurnOnParticles(WeaponElement[] array, Color col, int textToChange)
    {
        foreach (WeaponElement e in array) {
            ParticleSystem ps = e.gameObject.GetComponent<ParticleSystem>();

            if(textToChange != -1)
            {
                e.SetColor(textToChange, col);
            }
            else
            {
                ps.startColor = col;
                e.statText.color = col;
                e.statText.enabled = true;
            }

            ps.Emit(1);
        }
    }
Exemplo n.º 3
0
 private void OnWeaponClicked(WeaponElement clicked)
 {
     OnWeaponChoosed(clicked.TextWithId.text);
 }