コード例 #1
0
 public EssenceItem GetEssenceOfType(AffType type)
 {
     foreach (EssenceItem op in Essences)
     {
         if (op.type == type)
         {
             return(op);
         }
     }
     return(Essences[0]);
 }
コード例 #2
0
 public Color GetAffColor(AffType type)
 {
     foreach (BaseAffinityData aff in baseAffinities)
     {
         if (aff.type == type)
         {
             return(aff.col);
         }
     }
     return(Color.magenta);
 }
コード例 #3
0
 public BaseAffinityData GetBaseAff(AffType type)
 {
     foreach (BaseAffinityData bad in baseAffinities)
     {
         if (bad.type == type)
         {
             return(bad);
         }
     }
     return(baseAffinities[0]);
 }
コード例 #4
0
 public Affinity GetAffValue(AffType t)
 {
     foreach (Affinity aff in affinities)
     {
         if (aff.type == t)
         {
             return(aff);
         }
     }
     return(new Affinity(AffType.none, 0));
 }
コード例 #5
0
 public EssenceItem(AffType t, int q)
 {
     type     = t;
     quantity = q;
 }
コード例 #6
0
 public void SetAffinityValue(AffType aff, float val)
 {
     GetAffValue(aff).value = val;
 }
コード例 #7
0
 public void ChangeAffinityValue(AffType aff, float delta)
 {
     GetAffValue(aff).value += delta;
 }
コード例 #8
0
 public Affinity(AffType t, float va)
 {
     type  = t;
     value = va;
 }