public void addSighting(LabelHandle target, Vector3 position, Vector3?direction) { if (targetSightings.ContainsKey(target)) { SensoryInfo info = targetSightings[target]; if (info.getSightings() == 0) { // We have to increment the sighting count before we notify listeners info.addSighting(); notifyListenersTargetFound(target); } else { // Keep this. See above comment info.addSighting(); } info.updatePosition(position); info.updateDirection(direction); } else { targetSightings[target] = new SensoryInfo(position, direction, 1); notifyListenersTargetFound(target); } }