/// <summary> /// Adds a new entity and removes any nodes from the graph that collide /// with this entity /// </summary> public void AddCollidingEntity(Entity newEntity) { if (!_entitiesReadOnly) { _entities.Add(newEntity); } else { _addable.Add(newEntity); } _graph.RemoveEdgesFor(newEntity); }
/// <summary> /// Add a new entity to keep track of. /// </summary> public void AddEntity(Entity newEntity) { if (!_entitiesReadOnly) { _entities.Add(newEntity); } else { _addable.Add(newEntity); } }
public void RemoveEntity(Entity entity) { if (!_entitiesReadOnly) { _entities.Remove(entity); } else { _removable.Add(entity); } }
/// <summary> /// Construct a steering behavior that seeks the specified target. /// </summary> public FleeSteering(Entity target) { this._target = target; this._seekAtSteering = new SeekAtSteering(); }