Package marauroa.client.net
Class PerceptionHandler
java.lang.Object
marauroa.client.net.PerceptionHandler
The PerceptionHandler class is in charge of applying correctly the
perceptions to the world. You should always use this class because it is a
complex task that is easy to do in the wrong way.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
apply(MessageS2CPerception message, Map<RPObject.ID,RPObject> world_instance)
Apply a perception to a world instance.
-
Constructor Details
-
PerceptionHandler
public PerceptionHandler()Constructor -
PerceptionHandler
Constructor- Parameters:
listener
- the listener that will give meaning to perception handler.
-
-
Method Details
-
apply
public void apply(MessageS2CPerception message, Map<RPObject.ID,RPObject> world_instance) throws ExceptionApply a perception to a world instance.- Parameters:
message
- the perception messageworld_instance
- a map representing objects stored in a zone.- Throws:
Exception
-