public void EnableCharacterAvoidance(bool isTrue) { MyBotNavigation navigation = this.AnimalBot.Navigation; bool flag = navigation.HasSteeringOfType(this.m_characterAvoidance.GetType()); if (isTrue && !flag) { navigation.AddSteering(this.m_characterAvoidance); } else if (!isTrue & flag) { navigation.RemoveSteering(this.m_characterAvoidance); } }