Exemplo n.º 1
0
 void CalculateRecover(Recover_Bar recover)
 {
     Recover_Stats.hp         += recover.hp;
     Recover_Stats.mp         += recover.mp;
     Recover_Stats.precent_hp += recover.precent_hp;
     Recover_Stats.precent_mp += recover.precent_mp;
 }
Exemplo n.º 2
0
 void PartRecover(Recover_Bar recover)
 {
     if (recover.hp != 0 || recover.mp != 0 || recover.precent_hp != 0 || recover.precent_mp != 0)
     {
         var obj = Instantiate(PartsInfo.Panel, this.transform, true);
         if (recover.hp != 0)
         {
             var rec = Instantiate(PartsInfo.PanelList, obj.transform, true);
             rec.GetComponent <InfoList>().Text[0].text = "" + recover.hp;
         }
         if (recover.mp != 0)
         {
             var rec = Instantiate(PartsInfo.PanelList, obj.transform, true);
             rec.GetComponent <InfoList>().Text[0].text = "" + recover.mp;
         }
         if (recover.precent_hp != 0)
         {
             var rec = Instantiate(PartsInfo.PanelList, obj.transform, true);
             rec.GetComponent <InfoList>().Text[0].text = "" + recover.precent_hp + "%";
         }
         if (recover.precent_mp != 0)
         {
             var rec = Instantiate(PartsInfo.PanelList, obj.transform, true);
             rec.GetComponent <InfoList>().Text[0].text = "" + recover.precent_mp + "%";
         }
     }
 }
Exemplo n.º 3
0
 void RecoverStats(Recover_Bar recover)
 {
     recover.hp         = EditorGUILayout.IntField("HP", recover.hp);
     recover.mp         = EditorGUILayout.IntField("MP", recover.mp);
     recover.precent_hp = EditorGUILayout.IntSlider("HP %", recover.precent_hp, 0, 100);
     recover.precent_mp = EditorGUILayout.IntSlider("MP %", recover.precent_mp, 0, 100);
 }
Exemplo n.º 4
0
    public IConsume(IConsume item)
    {
        RemoveAllState = item.RemoveAllState;

        AddState    = item.AddState;
        RemoveState = item.RemoveState;
        AddTrait    = item.AddTrait;
        RemoveTrait = item.RemoveTrait;

        Stats   = item.Stats;
        Recover = item.Recover;

        Name        = item.Name;
        Icon        = item.Icon;
        Category    = item.Category;
        Description = item.Description;
        Value       = item.Value;
        Stack       = item.Stack;
    }