public void HandleInvoke(TcpClient client, string values) {
SplitData data = values.GetFirst();
switch (data.CommandType) {
case "StartGame":
Debug.Log("TODO: Add game start");
break;
case "CreateUnit":
CreateUnit(data.Values);
break;
case "SplitUnit":
SplitUnit(data.Values);
break;
case "MoveToEmpty":
Move(_invoke.MoveToEmpty, data.Values);
break;
case "MoveToMerge":
Move(_invoke.MoveToMerge, data.Values);
break;
case "MoveToAttack":
Move(_invoke.MoveToAttack, data.Values);
break;
case "CashChanged":
CashChanged(data.Values);
break;
default:
Debug.LogError("Invalid message send to Invokable\n" + values);
break;
}
}