-
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)Subscribers should be removed in the same manner
messenger.remove_subscriber("some_message_name", on_message)To send a message, simply call the MessagePasser.send method with the appropriate arguments
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