public void RemoveActingElement(SystemicElement elem) { if (currentActingElements.Contains(elem)) { currentActingElements.Remove(elem); } }
public void AddActingElement(SystemicElement elem) { if (!currentActingElements.Contains(elem)) { currentActingElements.Add(elem); } }
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(); } } }
//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); }