public override void UpdateStats(SpellComponent.SubSpellComponentType type, string components) { if (builder.GetRune() != null) { UpdateBaseStats(builder.GetRune()); } }
public override void UpdateStats(SpellComponent.SubSpellComponentType type, string components) { if (builder.page != null) { chaos.text = "" + builder.page.GetChaos(); coolDown.text = "" + builder.page.GetCoolDown(); UpdateBaseStats(builder.page); } }
public override void UpdateStats(SpellComponent.SubSpellComponentType type, string components) { ComponentLoader.UnLoadedSpellComponent unloadedComponent; unloadedComponent.name = components; unloadedComponent.type = type; ISpellComponent component = ComponentLoader.GetInstance().LoadComponent(unloadedComponent); UpdateBaseStats(component); }
public void CompIndexSelected(int index) { Debug.Log("index " + index); SpellComponent.SubSpellComponentType type = layOuts[selectedLayOut].type; string component = playerInventory.ownedComponents[type][index]; if (ComponentSelected != null) { ComponentSelected(type, component); } scrollbar.value = 1; }
void InitType(SpellComponent.SubSpellComponentType type, ProjectileSpellBookBuilder builder) { int i = 0; while (i < layOuts.Count) { if (type == layOuts[i].type) { ChangeLayOut(i); break; } i++; } }
public void InitBook(ProjectileSpellBookBuilder builder, ProjectileSpellBookBuilder newBuilder, SpellGrid spellGrid) { oldBuilder = newBuilder; stats.builder = newBuilder; spellGrid.GridChanged += stats.UpdateStats; SpellComponent.SubSpellComponentType type = SpellComponent.SubSpellComponentType.Rune; InitType(type, builder); int index = playerInventory.ownedComponents[type].FindIndex(delegate(string s) { return(s == builder.GetRune().GetTitle()); }); if (index >= 0) { CompIndexSelected(index); } else { Debug.LogError("Cant find that in the option list " + builder.GetRune().GetTitle()); } type = SpellComponent.SubSpellComponentType.language; InitType(type, builder); index = playerInventory.ownedComponents[type].FindIndex(delegate(string s) { return(s == builder.lang.GetTitle()); }); if (index >= 0) { CompIndexSelected(index); } else { Debug.LogError("Cant find that in the option list " + builder.lang.GetTitle()); } type = SpellComponent.SubSpellComponentType.Paper; InitType(type, builder); index = playerInventory.ownedComponents[type].FindIndex(delegate(string s) { return(s == builder.page.GetTitle()); }); if (index >= 0) { CompIndexSelected(index); } else { Debug.LogError("Cant find that in the option list " + builder.page.GetTitle()); } type = SpellComponent.SubSpellComponentType.Ink; InitType(type, builder); CompIndexSelected(0); ChangeLayOut(layOuts.Count - 1); stats.UpdateStats(); scrollbar.value = 1; }
void ComponenetSelected(SpellComponent.SubSpellComponentType type, string component) { switch (type) { case SpellComponent.SubSpellComponentType.Rune: RuneChanged(component); break; case SpellComponent.SubSpellComponentType.language: LangChanged(component); break; case SpellComponent.SubSpellComponentType.Paper: PageChanged(component); break; case SpellComponent.SubSpellComponentType.Ink: InkChanged(component); break; } }
public UnLoadedSpellComponent(string n, SpellComponent.SubSpellComponentType t) { name = n; type = t; }
public abstract void UpdateStats(SpellComponent.SubSpellComponentType type, string components);