protected void performNotification( long perceiverOid, long perceivedOid, boolean inRadius, boolean wasInRadius) { if (Log.loggingDebug) Log.debug( "ProximityTracker.performNotification: perceiverOid " + perceiverOid + ", perceivedOid " + perceivedOid + ", inRadius " + inRadius + ", wasInRadius " + wasInRadius); if (notifyCallback != null) { notifyCallback.notifyReactionRadius(perceivedOid, perceiverOid, inRadius, wasInRadius); notifyCallback.notifyReactionRadius(perceiverOid, perceivedOid, inRadius, wasInRadius); } else { ObjectTracker.NotifyReactionRadiusMessage nmsg = new ObjectTracker.NotifyReactionRadiusMessage( perceivedOid, perceiverOid, inRadius, wasInRadius); Engine.getAgent().sendBroadcast(nmsg); nmsg = new ObjectTracker.NotifyReactionRadiusMessage( perceiverOid, perceivedOid, inRadius, wasInRadius); Engine.getAgent().sendBroadcast(nmsg); } }
public void deactivate() { if (Log.loggingDebug) log.debug( "CollectionQuestState.deactivate: playerOid=" + getPlayerOid() + " questRef=" + getQuestRef()); if (sub != null) { Engine.getAgent().removeSubscription(sub); } }
public void activate() { if (Log.loggingDebug) log.debug("in activate: this " + this); // subscribe for some messages SubjectFilter filter = new SubjectFilter(getPlayerOid()); filter.addType(InventoryClient.MSG_TYPE_INV_UPDATE); filter.addType(QuestClient.MSG_TYPE_CONCLUDE_QUEST); sub = Engine.getAgent().createSubscription(filter, this); makeDeliveryItems(); updateQuestLog(); updateObjectiveStatus(); // updateQuestObjectives(); log.debug("QuestPlugin activated"); }