C# Class Dwarrowdelf.Client.ItemTracker

Tracks all items in an env. This could/should keep different item categories in different lists, and use http://blogs.msdn.com/b/devdev/archive/2007/06/07/k-nearest-neighbor-spatial-search.aspx to speed up the search by distance.
Mostrar archivo Open project: tomba/dwarrowdelf Class Usage Examples

Public Methods

Method Description
GetItemsByDistance ( IntVector3 location, bool>.Func filter ) : IEnumerable
GetItemsByDistance ( IntVector3 location, ItemCategory category, bool>.Func filter ) : IEnumerable
GetReachableItemByDistance ( IntVector3 location, IItemFilter filter, Unreachables unreachables ) : ItemObject
ItemTracker ( EnvironmentObject env ) : System

Private Methods

Method Description
Environment_ObjectAdded ( MovableObject obj ) : void
Environment_ObjectMoved ( MovableObject obj, IntVector3 oldPos ) : void
Environment_ObjectRemoved ( MovableObject obj ) : void

Method Details

GetItemsByDistance() public method

public GetItemsByDistance ( IntVector3 location, bool>.Func filter ) : IEnumerable
location IntVector3
filter bool>.Func
return IEnumerable

GetItemsByDistance() public method

public GetItemsByDistance ( IntVector3 location, ItemCategory category, bool>.Func filter ) : IEnumerable
location IntVector3
category ItemCategory
filter bool>.Func
return IEnumerable

GetReachableItemByDistance() public method

public GetReachableItemByDistance ( IntVector3 location, IItemFilter filter, Unreachables unreachables ) : ItemObject
location IntVector3
filter IItemFilter
unreachables Unreachables
return ItemObject

ItemTracker() public method

public ItemTracker ( EnvironmentObject env ) : System
env EnvironmentObject
return System