Skip to content
Angus Hollands edited this page Oct 17, 2015 · 2 revisions

Introduction

The Message system offers the ability to pass messages between systems and subsystems, within a specific scope.

Adding subscribers

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

messenger.remove_subscriber("some_message_name", on_message)

Sending messages

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")

Getting Started

#Network

Worlds & Scenes

##Replication Overview

Attributes

Functions

Gotchas

##Serialisation Data handlers

##Communication Messaging

#Game Framework ##Bindings Creating bindings

Clone this wiki locally