User Tools

Site Tools


besiege:modding:networking

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
besiege:modding:networking [2018/07/24 16:00]
spaar [Receiving Messages]
besiege:modding:networking [2018/07/24 16:02] (current)
spaar [Receiving Messages]
Line 97: Line 97:
     Messages.Example = ...;     Messages.Example = ...;
     ModNetworking.Callbacks[Messages.Example] = msg => {     ModNetworking.Callbacks[Messages.Example] = msg => {
-        ​Debug.Log($"​Received a message from {msg.Sender.Name}, ​x = {(float)msg.GetData(0)}, b = {((Block)msg.GetData(1)).Guid}!");+        ​float x = (float)msg.GetData(0)
 +        Block b = (Block)msg.GetData(1)
 +        Debug.Log("​Received a message from " + msg.Sender.Name 
 +            + ", x = " + x 
 +            + ", b = " + b.Guid + "!");
     };     };
 } }
 </​code>​ </​code>​
besiege/modding/networking.txt · Last modified: 2018/07/24 16:02 by spaar