public void updateInfo(LabelHandle target) { if (getSightings() > 0) { updatePosition(target.getPosition()); updateTime(System.DateTime.Now); updateAttachedTags(target.getTags()); if (target.getDirection() != null) { updateDirection(target.getDirection()); } } }
public void addSighting(LabelHandle target, Vector3 position, Vector3? direction) { if (targetSightings.ContainsKey (target)) { SensoryInfo info = targetSightings[target]; info.addSighting(); info.updateInfo(target); } else { if (staleTargetSightings.ContainsKey(target)) { SensoryInfo info = staleTargetSightings[target]; targetSightings.Add(target, info); staleTargetSightings.Remove(target); info.addSighting(); } else { targetSightings[target] = new SensoryInfo(position, direction, System.DateTime.Now, target.getTags(), 1); } registerTags(target); notifyListenersTargetFound(target); } }
private void notifyListenersTargetLost(LabelHandle target) { foreach (Tag tag in target.getTags()) { notifyListenersTagRemoved(tag); } }
private void notifyListenersTargetFound(LabelHandle target) { foreach (Tag tag in target.getTags()) { notifyListenersTagAdded(tag); } }