-
Notifications
You must be signed in to change notification settings - Fork 5
Messages
Angus Hollands edited this page Oct 17, 2015
·
2 revisions
The Message system offers the ability to pass messages between systems and subsystems, within a specific scope.
Each message system supports a variable number of subscribers to the same message ID. These subscribers will be called with the message's arguments when the messenger's send() function is called (with arguments)
messenger = MessagePasser()
def on_message(arg1, arg2):
print("message received!", arg1, arg2)
messenger.add_subscriber("some_message_name", on_message)```
# Removing subscribers
Subscribers should be removed in the same manner
```python
messenger.remove_subscriber("some_message_name", on_message)```
# Sending messages
To send a message, simply call the MessagePasser.send method with the appropriate arguments
```python
messenger.send("some_message_name", "This is Arg 1", arg2="This is Arg 2")```#Network
##Replication Overview
##Serialisation Data handlers
##Communication Messaging
#Game Framework ##Bindings Creating bindings