public void DeregisterSteeringBehaviour(SteeringBehaviour behaviour) { behaviours.Remove(behaviour); }
public void RegisterSteeringBehaviour(SteeringBehaviour behaviour) { behaviours.Add(behaviour); }
public void TurnOn(Behaviour B) { switch (B) { case Behaviour.Arrive: { Steer2D.SteeringBehaviour SteeringBeh = GetBehaviourByTypeName("Steer2D.Arrive"); if (SteeringBeh) { SteeringBeh.enabled = true; } } break; case Behaviour.Evade: { Steer2D.SteeringBehaviour SteeringBeh = GetBehaviourByTypeName("Steer2D.Evade"); if (SteeringBeh) { SteeringBeh.enabled = true; } } break; case Behaviour.Flee: { Steer2D.SteeringBehaviour SteeringBeh = GetBehaviourByTypeName("Steer2D.Flee"); if (SteeringBeh) { SteeringBeh.enabled = true; } } break; case Behaviour.Flock: { Steer2D.SteeringBehaviour SteeringBeh = GetBehaviourByTypeName("Steer2D.Flock"); if (SteeringBeh) { SteeringBeh.enabled = true; } } break; case Behaviour.FollowPath: { Steer2D.SteeringBehaviour SteeringBeh = GetBehaviourByTypeName("Steer2D.FollowPath"); if (SteeringBeh) { SteeringBeh.enabled = true; } } break; case Behaviour.Pursue: { Steer2D.SteeringBehaviour SteeringBeh = GetBehaviourByTypeName("Steer2D.Pursue"); if (SteeringBeh) { SteeringBeh.enabled = true; } } break; case Behaviour.Seek: { Steer2D.SteeringBehaviour SteeringBeh = GetBehaviourByTypeName("Steer2D.Seek"); if (SteeringBeh) { SteeringBeh.enabled = true; } } break; } }