Beispiel #1
0
 public void RemoveActingElement(SystemicElement elem)
 {
     if (currentActingElements.Contains(elem))
     {
         currentActingElements.Remove(elem);
     }
 }
Beispiel #2
0
 public void AddActingElement(SystemicElement elem)
 {
     if (!currentActingElements.Contains(elem))
     {
         currentActingElements.Add(elem);
     }
 }
Beispiel #3
0
 public void ReactToElement(SystemicElement type, ElementSize size)
 {
     for (int i = 0; i < reactions.Length; i++)
     {
         if (reactions[i].theElement == type &&
             ((reactions[i].theSize != ElementSize.NONE && (int)size >= (int)reactions[i].theSize) ||
              reactions[i].theSize == ElementSize.NONE)
             )
         {
             reactions[i].actions.Invoke();
         }
     }
 }
Beispiel #4
0
 //return -1 if elem1 is stronger, 0 is both are equal, 1 is elem2 is stronger
 public static int GetStrongerElement(SystemicElement elem1, SystemicElement elem2)
 {
     switch (elem1)
     {
     case SystemicElement.FIRE:
     {
         switch (elem2)
         {
         case SystemicElement.WATER:
             return(1);
         }
         break;
     }
     }
     return(0);
 }