//This updates the interactions of all wings near this one; call this one when somethign changes rather than all of them at once public HashSet <FARWingAerodynamicModel> UpdateNearbyWingInteractions(HashSet <FARWingAerodynamicModel> wingsHandled) { //Hashset to avoid repeating the same one affected for (int i = 0; i < nearbyWingModulesForwardList.Count; i++) { FARWingAerodynamicModel w = nearbyWingModulesForwardList[i]; if (!wingsHandled.Contains(w)) { w.UpdateThisWingInteractions(); wingsHandled.Add(w); } } for (int i = 0; i < nearbyWingModulesBackwardList.Count; i++) { FARWingAerodynamicModel w = nearbyWingModulesBackwardList[i]; if (!wingsHandled.Contains(w)) { w.UpdateThisWingInteractions(); wingsHandled.Add(w); } } for (int i = 0; i < nearbyWingModulesRightwardList.Count; i++) { FARWingAerodynamicModel w = nearbyWingModulesRightwardList[i]; if (!wingsHandled.Contains(w)) { w.UpdateThisWingInteractions(); wingsHandled.Add(w); } } for (int i = 0; i < nearbyWingModulesLeftwardList.Count; i++) { FARWingAerodynamicModel w = nearbyWingModulesLeftwardList[i]; if (!wingsHandled.Contains(w)) { w.UpdateThisWingInteractions(); wingsHandled.Add(w); } } return(wingsHandled); }