private void SetDisposition(EntityOLD e, EntityOLD.Disposition d) { KeyValuePair <EntityOLD, EntityOLD.Disposition> newEntry = new KeyValuePair <EntityOLD, EntityOLD.Disposition>(e, d); RemoveNearbyEntity(e); nearbyEntities.Add(newEntry); }
public List <EntityOLD> GetNearbyEntitiesOfDisposition(EntityOLD.Disposition d) { List <EntityOLD> list = new List <EntityOLD>(); foreach (KeyValuePair <EntityOLD, EntityOLD.Disposition> kvp in nearbyEntities) { if (kvp.Value == d) { list.Add(kvp.Key); } } return(list); }