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); } }
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)); }
public void Create(string newEffectName) { foreach (AuricaSpellComponent item in allComponents) { if (item.name == newEffectName) { component = item; break; } } }
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); } } }
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}); }
public void AddComponent(AuricaSpellComponent newComponent) { componentList.Add(newComponent); WipeList(); PopulateList(); }