I have an array of array of message that I need to send to the server, Unfortunately, I need to code the server module on C#. So what I’m asking is which data structure should correspond to this data structure
My code is more or less as such:
//Javascript part on the game engine
var actionMsg1 : Array = new Array();
var actionMsg2 : Array = new Array();
var actionMsg3 : Array = new Array();
actionMsg1.Push("object A");
actionMsg1.Push("Move");
actionMsg1.Push("tile [2,2]");
actionMsg1.Push("object A");
actionMsg1.Push("shoot");
actionMsg1.Push("object B");
var arrMovementMsg : Array = new Array();
arrMovementMsg.Push(actionMsg1);
arrMovementMsg.Push(actionMsg1);
msgPacker.PackMessage(arrMovementMsg);
Now msgPacker’s clas is the class written in C#, so I’m confused how I’m gonna make the method signature for it? I definitely can’t make
public PackMessage(Array arrMovementMsg)
on the script, since C# doesn’t have Array class. So which data type should I use to correspond to the data type array in javascript? Do I have any other choice than reworking on the game engine’s message system so that It process an array of string? (