Example #1
0
 public void AddComponent(componentEnum comp, int count)
 {
     for (int i = 0; i < components.Count; i++)
     {
         if (components[i].componentName == comp)
         {
             components[i].count += count;
         }
     }
 }
Example #2
0
 public bool AddComponentWithReturn(componentEnum comp, int count)
 {
     for (int i = 0; i < components.Count; i++)
     {
         if (components[i].componentName == comp)
         {
             components[i].count += count;
             return(true);
         }
     }
     return(false);
 }