added delegate for reading server response

This commit is contained in:
Sem van der Hoeven
2020-09-25 13:26:48 +02:00
parent 64773ffe1c
commit fac3987678
3 changed files with 95 additions and 4 deletions

View File

@@ -119,9 +119,9 @@ namespace RH_Engine
panel = new
{
size = new int[] { 1, 1 },
resolution = new int[] { 256, 256 },
background = new int[] { 1, 1, 1, 1 },
castShadow = true
resolution = new int[] { 512, 512 },
background = new int[] { 1, 0, 0, 0 },
castShadow = false
}
}
@@ -140,7 +140,7 @@ namespace RH_Engine
{
id = uuidPanel,
text = "Bike speed placeholder",
position = new int[] { 0, 0 },
position = new int[] { 100, 100 },
size = 32.0,
color = new int[] { 0, 0, 0, 1 },
font = "segoeui"
@@ -150,6 +150,20 @@ namespace RH_Engine
return JsonConvert.SerializeObject(Payload(payload));
}
public string SwapPanelCommand(string uuid)
{
dynamic payload = new
{
id = "scene/panel/swap",
data = new
{
id = uuid
}
};
return JsonConvert.SerializeObject(Payload(payload));
}
public string ClearPanel(string uuid)
{
dynamic payload = new