コード例 #1
0
 public void PowerAbility(JewelID jewel, int amount)
 {
     foreach (IRuntimeAbilityComponent comp in abilityComponents)
     {
         comp.PowerComponent(jewel, amount);
     }
 }
コード例 #2
0
ファイル: RuntimeMoheData.cs プロジェクト: BradZzz/Moheum
 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
ファイル: UIJewelComponent.cs プロジェクト: BradZzz/Moheum
 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
ファイル: UiAttackCost.cs プロジェクト: BradZzz/Moheum
        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);
 }