protected override void AddGeometry(ISceneGeometryObject Object) { Debug.Assert(Object is TiledPlatformerGeometryObject); // Of course we should use something like a QuadTree, // but we're not actually doing solid entities so too few to matter. _Geometry.Add(Object); }
protected override void RemoveGeometry(ISceneGeometryObject Object) { bool Removed = _Geometry.Remove(Object); if (!Removed) { throw new KeyNotFoundException(); } }
protected override IGlobalPath PerformPathCalculation(Entity Entity, ISceneGeometryObject EndPoint) { return(null); }
/// <summary> /// Calculates a global path to take the given entity to the specified EndPoint. /// </summary> public virtual IGlobalPath CalculateGlobalPath(Entity Entity, ISceneGeometryObject EndPoint) { // We can do some stuff like caching here if we want. return CalculateGlobalPath(Entity, EndPoint); }
/// <summary> /// Called when the specified geometry should be added to this Scene's geometry. /// </summary> protected abstract void AddGeometry(ISceneGeometryObject Object);
/// <summary> /// Override to perform handling the actual calculation of a global path. /// </summary> protected abstract IGlobalPath PerformPathCalculation(Entity Entity, ISceneGeometryObject EndPoint);
/// <summary> /// Called when the specified geometry should be removed from this Scene's geometry. /// </summary> protected abstract void RemoveGeometry(ISceneGeometryObject Object);
/// <summary> /// Calculates a global path to take the given entity to the specified EndPoint. /// </summary> public virtual IGlobalPath CalculateGlobalPath(Entity Entity, ISceneGeometryObject EndPoint) { // We can do some stuff like caching here if we want. return(CalculateGlobalPath(Entity, EndPoint)); }
public void AdvanceNode() { this._CurrentNode = Nodes.Dequeue(); }
public TiledPlatformerGlobalPath(Queue<TiledPlatformerGeometryObject> Nodes) { this.Nodes = Nodes; this._CurrentNode = Nodes.Count > 0 ? Nodes.Dequeue() : null; }
protected override void RemoveGeometry(ISceneGeometryObject Object) { bool Removed = _Geometry.Remove(Object); if(!Removed) throw new KeyNotFoundException(); }
protected override IGlobalPath PerformPathCalculation(Entity Entity, ISceneGeometryObject EndPoint) { return null; }