예제 #1
0
 public void PowerAbility(JewelID jewel, int amount)
 {
     foreach (IRuntimeAbilityComponent comp in abilityComponents)
     {
         comp.PowerComponent(jewel, amount);
     }
 }
예제 #2
0
 public void PopulateAbilities(JewelID jewel, int amount)
 {
     foreach (IRuntimeAbility abil in abilities)
     {
         abil.PowerAbility(jewel, amount);
     }
 }
예제 #3
0
 public void PowerComponent(JewelID JewelType, int amount)
 {
     if (JewelType == jewelType)
     {
         has += amount;
     }
     if (has > needs)
     {
         has = needs;
     }
 }
예제 #4
0
 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);
     }
 }
예제 #5
0
        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);
        }
예제 #6
0
 public AbilityComponent(JewelID JewelType, int Needs)
 {
     jewelType = JewelType;
     needs     = Needs;
 }
예제 #7
0
        public void OnTransformJewel(IRuntimeJewel jewel, JewelID transformType)
        {
            JewelData data = JewelDatabase.Instance.Get(transformType);

            jewel.TransformJewel(data);
        }
예제 #8
0
 public JewelData Get(JewelID id)
 {
     return(Jewels?.Find(jewel => jewel.JewelID == id));
 }
예제 #9
0
 public void ChargeAbility(JewelID jewel)
 {
     player.Roster.CurrentMohe().PopulateAbilities(jewel, 1);
 }