wiki.sine.space | sinespace

Difference between revisions of "Scripting/SNetworkMessage"

From wiki.sine.space
Jump to: navigation, search
Line 5: Line 5:
 
{{ScriptFunction|IDictionary(object,object)|Message|{ get; }|The message body which was sent|5=<i>-- This function gets used by other objects that are subscribed to the network</i><br>
 
{{ScriptFunction|IDictionary(object,object)|Message|{ get; }|The message body which was sent|5=<i>-- This function gets used by other objects that are subscribed to the network</i><br>
 
gotAMessage = function(arguments)<br>
 
gotAMessage = function(arguments)<br>
&nbsp;&nbsp;textValue.UIText.Text = "Got a message with the argument " .. arguments.Message["someArgument"];<br>
+
&nbsp;&nbsp;local sampleMsg = "Got a message with the argument " .. arguments.Message["someArgument"];<br>
 
end<br><br>
 
end<br><br>
 
<i>-- View SubscribeToNetwork in [[Scripting/SNetwork]] for full script example.</i>}}
 
<i>-- View SubscribeToNetwork in [[Scripting/SNetwork]] for full script example.</i>}}

Revision as of 17:45, 20 April 2017

The SNetworkMessage class contains a network message sent by another script

Fields

Key

string Key { get; }

The key this message was sent with

No example provided yet


Message

The message body which was sent

-- This function gets used by other objects that are subscribed to the network

gotAMessage = function(arguments)
  local sampleMsg = "Got a message with the argument " .. arguments.Message["someArgument"];
end

-- View SubscribeToNetwork in Scripting/SNetwork for full script example.