public void PowerAbility(JewelID jewel, int amount) { foreach (IRuntimeAbilityComponent comp in abilityComponents) { comp.PowerComponent(jewel, amount); } }
public void PopulateAbilities(JewelID jewel, int amount) { foreach (IRuntimeAbility abil in abilities) { abil.PowerAbility(jewel, amount); } }
public void PowerComponent(JewelID JewelType, int amount) { if (JewelType == jewelType) { has += amount; } if (has > needs) { has = needs; } }
public void OnTransformJewel(IRuntimeJewel jewel, JewelID transformType) { //Debug.Log("OnTransformJewel"); //Debug.Log(UIRuntimeData); //Debug.Log(jewel); if (UIRuntimeData.RuntimeData != null && UIRuntimeData.RuntimeData.JewelID == jewel.JewelID) { JewelData data = JewelDatabase.Instance.Get(transformType); IRuntimeJewel jwl = UIRuntimeData.RuntimeData; jwl.TransformJewel(data); UIRuntimeData.OnSetData?.Invoke(jwl); } }
bool Refresh() { if (Ability == null) { return(false); } IRuntimeAbilityComponent comp = ability.AbilityComponents[componentIdx]; id = comp.JewelType; List <JewelData> jewels = JewelDatabase.Instance.GetFullList(); img.sprite = jewels.First(jewel => jewel.JewelID == id).Artwork; txt.text = comp.Has.ToString() + " / " + comp.Needs.ToString(); return(true); }
public AbilityComponent(JewelID JewelType, int Needs) { jewelType = JewelType; needs = Needs; }
public void OnTransformJewel(IRuntimeJewel jewel, JewelID transformType) { JewelData data = JewelDatabase.Instance.Get(transformType); jewel.TransformJewel(data); }
public JewelData Get(JewelID id) { return(Jewels?.Find(jewel => jewel.JewelID == id)); }
public void ChargeAbility(JewelID jewel) { player.Roster.CurrentMohe().PopulateAbilities(jewel, 1); }