Esempio n. 1
0
    public void AddComponent(AuricaSpellComponent newComponent)
    {
        if (currentComponents.Count >= 10)
        {
            currentManaCost += 10f;
        }
        else if (currentComponents.Count > 12)
        {
            currentManaCost += 20f;
        }
        currentComponents.Add(newComponent);
        currentManaCost += newComponent.GetManaCost(aura.GetAura());
        ManaDistribution oldMd = currentDistribution;

        currentDistribution = newComponent.CalculateDistributionChange(currentDistribution, aura.GetAura());

        //Debug.Log("Added component: " + newComponent.c_name + "    Current Mana Cost: " + currentManaCost);
        //Debug.Log("Old Distribution: " + oldMd.ToString() + "    New Distribution: " + currentDistribution.ToString());

        if (distDisplay != null)
        {
            distDisplay.SetDistribution(currentDistribution);
        }
        if (cpUI != null)
        {
            cpUI.AddComponent(newComponent);
        }
    }
Esempio n. 2
0
    public int CompareTo(AuricaSpellComponent other)
    {
        if (this.category.CompareTo(other.category) == 0)
        {
            return(this.c_name.CompareTo(other.c_name));
        }

        return(this.category.CompareTo(other.category));
    }
Esempio n. 3
0
 public void Create(string newEffectName)
 {
     foreach (AuricaSpellComponent item in allComponents)
     {
         if (item.name == newEffectName)
         {
             component = item;
             break;
         }
     }
 }
Esempio n. 4
0
    public void AddComponent(AuricaSpellComponent component)
    {
        if (currentIndex >= maxComponents)
        {
            HideAllComponents();
        }
        ComponentPanels[currentIndex].gameObject.SetActive(true);
        ComponentPanels[currentIndex].SetComponent(component, allGlyphs);
        currentIndex += 1;

        spell = AuricaCaster.LocalCaster.Cast();
        if (spell != null && spell.c_name != null)
        {
            spellText.gameObject.SetActive(true);
            spellText.text = spell.c_name.ToUpper();

            foreach (SideBarComponent item in ComponentPanels)
            {
                item.ActivateComponent(spell);
            }
        }
    }
Esempio n. 5
0
 public void SetComponent(AuricaSpellComponent c)
 {
     component = c;
     SetTitle(c.c_name);
 }
 void OnEnable()
 {
     component = (AuricaSpellComponent)target;
     // if (component.basicDistribution.Count == 0) component.basicDistribution = new List<float>(new float[]{0f, 0f, 0f, 0f, 0f, 0f, 0f});
 }
Esempio n. 7
0
 public void AddComponent(AuricaSpellComponent newComponent)
 {
     componentList.Add(newComponent);
     WipeList();
     PopulateList();
 }