void Off(behaviour_type bType) { if (On(bType)) { m_iflag ^= bType; } }
behaviour_type Off(behaviour_type bType, behaviour_type iflag) { if (On(bType, iflag)) { iflag ^= bType; } return(iflag); }
public bool IsSteering() { behaviour_type clongFlag = m_iflag; clongFlag = Off(behaviour_type.obstacle_avoidance, clongFlag); clongFlag = Off(behaviour_type.wall_avoidance, clongFlag); return(((int)clongFlag > 1) ? true : false); }
public void FollowPathOn() { m_iflag |= behaviour_type.follow_path; }
public void AlignmentOn() { m_iflag |= behaviour_type.allignment; }
public void WanderOn() { m_iflag |= behaviour_type.wander; }
public void ArriveOn() { m_iflag |= behaviour_type.arrive; }
public void SeekOn() { m_iflag |= behaviour_type.seek; }
public bool isOn(behaviour_type behaviour) { return((flags & (int)behaviour) == (int)behaviour); }
public bool isOn(behaviour_type behaviour) { return ((flags & (int)behaviour) == (int)behaviour); }
public void BasicOn() { m_iflag |= behaviour_type.obstacle_avoidance; m_iflag |= behaviour_type.wall_avoidance; }
bool On(behaviour_type bType, behaviour_type iflag) { return((iflag & bType) == bType); }
bool On(behaviour_type bType) { return((m_iflag & bType) == bType); }
public void turnOn(behaviour_type behaviour) { flags |= ((int)behaviour); }
public void GravityOn() { m_iflag |= behaviour_type.gravity; }
public void CohesionOn() { m_iflag |= behaviour_type.cohesion; }
public void FleeOn() { m_iflag |= behaviour_type.flee; }
public void turnOff(behaviour_type behaviour) { flags &= ( ~ (int)behaviour); }