fix bug from refactor

This commit is contained in:
Cassandra de la Cruz-Munoz 2023-08-17 18:22:27 -04:00
parent de222b1d91
commit a0a7df3e08
26 changed files with 177 additions and 177 deletions

View File

@ -34,12 +34,12 @@ namespace godotVmcSharp
}
if (m.Data[0].Type != 's')
{
GD.Print(InvalidArgumentType.GetErrorString(addr, "name", 's', m.Data[0].Type));
GD.Print(InvalidArgumentType.GetErrorString(Addr, "name", 's', m.Data[0].Type));
return;
}
if (m.Data[1].Type != 'f')
{
GD.Print(InvalidArgumentType.GetErrorString(addr, "value", 'f', m.Data[1].Type));
GD.Print(InvalidArgumentType.GetErrorString(Addr, "value", 'f', m.Data[1].Type));
return;
}
var blendShape = (string)m.Data[0].Value;
@ -61,7 +61,7 @@ namespace godotVmcSharp
Value = (float)m.Data[1].Value;
return;
}
GD.Print($"Invalid argument for {addr}. BlendShape \"{blendShape}\" not in list.");
GD.Print($"Invalid argument for {Addr}. BlendShape \"{blendShape}\" not in list.");
}
public VmcExtBlendVal(string name, float value) : base(new OscAddress("VMC/Ext/Blend/Val"))
@ -84,7 +84,7 @@ namespace godotVmcSharp
Value = value;
return;
}
GD.Print($"Invalid argument for {addr}. BlendShape \"{name}\" not in list.");
GD.Print($"Invalid argument for {Addr}. BlendShape \"{name}\" not in list.");
}
private bool IsVrm0BlendShape(string name)
@ -134,7 +134,7 @@ namespace godotVmcSharp
}
public new OscMessage ToMessage()
{
return new OscMessage(addr, new System.Collections.Generic.List<OscArgument> {
return new OscMessage(Addr, new System.Collections.Generic.List<OscArgument> {
new OscArgument(Name, 's'),
new OscArgument(Value, 'f')
});

View File

@ -30,47 +30,47 @@ namespace godotVmcSharp
{
if (m.Data.Count != 8)
{
GD.Print($"Invalid number of arguments for {addr}. Expected 8, received {m.Data.Count}.");
GD.Print($"Invalid number of arguments for {Addr}. Expected 8, received {m.Data.Count}.");
return;
}
if (m.Data[0].Type != 's')
{
GD.Print(InvalidArgumentType.GetErrorString(addr, "name", 's', m.Data[0].Type));
GD.Print(InvalidArgumentType.GetErrorString(Addr, "name", 's', m.Data[0].Type));
return;
}
if (m.Data[1].Type != 'f')
{
GD.Print(InvalidArgumentType.GetErrorString(addr, "p.x", 'f', m.Data[1].Type));
GD.Print(InvalidArgumentType.GetErrorString(Addr, "p.x", 'f', m.Data[1].Type));
return;
}
if (m.Data[2].Type != 'f')
{
GD.Print(InvalidArgumentType.GetErrorString(addr, "p.y", 'f', m.Data[2].Type));
GD.Print(InvalidArgumentType.GetErrorString(Addr, "p.y", 'f', m.Data[2].Type));
return;
}
if (m.Data[3].Type != 'f')
{
GD.Print(InvalidArgumentType.GetErrorString(addr, "p.z", 'f', m.Data[3].Type));
GD.Print(InvalidArgumentType.GetErrorString(Addr, "p.z", 'f', m.Data[3].Type));
return;
}
if (m.Data[4].Type != 'f')
{
GD.Print(InvalidArgumentType.GetErrorString(addr, "q.x", 'f', m.Data[4].Type));
GD.Print(InvalidArgumentType.GetErrorString(Addr, "q.x", 'f', m.Data[4].Type));
return;
}
if (m.Data[5].Type != 'f')
{
GD.Print(InvalidArgumentType.GetErrorString(addr, "q.y", 'f', m.Data[5].Type));
GD.Print(InvalidArgumentType.GetErrorString(Addr, "q.y", 'f', m.Data[5].Type));
return;
}
if (m.Data[6].Type != 'f')
{
GD.Print(InvalidArgumentType.GetErrorString(addr, "q.z", 'f', m.Data[6].Type));
GD.Print(InvalidArgumentType.GetErrorString(Addr, "q.z", 'f', m.Data[6].Type));
return;
}
if (m.Data[7].Type != 'f')
{
GD.Print(InvalidArgumentType.GetErrorString(addr, "q.w", 'f', m.Data[7].Type));
GD.Print(InvalidArgumentType.GetErrorString(Addr, "q.w", 'f', m.Data[7].Type));
return;
}
Name = (string)m.Data[0].Value;
@ -86,7 +86,7 @@ namespace godotVmcSharp
public new OscMessage ToMessage()
{
var quat = Transform.Basis.GetRotationQuaternion();
return new OscMessage(addr, new System.Collections.Generic.List<OscArgument>{
return new OscMessage(Addr, new System.Collections.Generic.List<OscArgument>{
new OscArgument(Name, 's'),
new OscArgument(Transform.Origin.X, 'f'),
new OscArgument(Transform.Origin.Y, 'f'),

View File

@ -37,42 +37,42 @@ namespace godotVmcSharp
}
if (m.Data[0].Type != 's')
{
GD.Print(InvalidArgumentType.GetErrorString(addr, "name", 's', m.Data[0].Type));
GD.Print(InvalidArgumentType.GetErrorString(Addr, "name", 's', m.Data[0].Type));
return;
}
if (m.Data[1].Type != 'f')
{
GD.Print(InvalidArgumentType.GetErrorString(addr, "p.x", 'f', m.Data[1].Type));
GD.Print(InvalidArgumentType.GetErrorString(Addr, "p.x", 'f', m.Data[1].Type));
return;
}
if (m.Data[2].Type != 'f')
{
GD.Print(InvalidArgumentType.GetErrorString(addr, "p.y", 'f', m.Data[2].Type));
GD.Print(InvalidArgumentType.GetErrorString(Addr, "p.y", 'f', m.Data[2].Type));
return;
}
if (m.Data[3].Type != 'f')
{
GD.Print(InvalidArgumentType.GetErrorString(addr, "p.z", 'f', m.Data[3].Type));
GD.Print(InvalidArgumentType.GetErrorString(Addr, "p.z", 'f', m.Data[3].Type));
return;
}
if (m.Data[4].Type != 'f')
{
GD.Print(InvalidArgumentType.GetErrorString(addr, "q.x", 'f', m.Data[4].Type));
GD.Print(InvalidArgumentType.GetErrorString(Addr, "q.x", 'f', m.Data[4].Type));
return;
}
if (m.Data[5].Type != 'f')
{
GD.Print(InvalidArgumentType.GetErrorString(addr, "q.y", 'f', m.Data[5].Type));
GD.Print(InvalidArgumentType.GetErrorString(Addr, "q.y", 'f', m.Data[5].Type));
return;
}
if (m.Data[6].Type != 'f')
{
GD.Print(InvalidArgumentType.GetErrorString(addr, "q.z", 'f', m.Data[6].Type));
GD.Print(InvalidArgumentType.GetErrorString(Addr, "q.z", 'f', m.Data[6].Type));
return;
}
if (m.Data[7].Type != 'f')
{
GD.Print(InvalidArgumentType.GetErrorString(addr, "q.w", 'f', m.Data[7].Type));
GD.Print(InvalidArgumentType.GetErrorString(Addr, "q.w", 'f', m.Data[7].Type));
return;
}
if (m.Data[8].Type != 'f')
@ -95,7 +95,7 @@ namespace godotVmcSharp
public new OscMessage ToMessage()
{
var quat = Transform.Basis.GetRotationQuaternion();
return new OscMessage(addr, new System.Collections.Generic.List<OscArgument>{
return new OscMessage(Addr, new System.Collections.Generic.List<OscArgument>{
new OscArgument(Name, 's'),
new OscArgument(Transform.Origin.X, 'f'),
new OscArgument(Transform.Origin.Y, 'f'),

View File

@ -39,37 +39,37 @@ namespace godotVmcSharp
}
if (m.Data[0].Type != 'i')
{
GD.Print(InvalidArgumentType.GetErrorString(addr, "active", 'i', m.Data[0].Type));
GD.Print(InvalidArgumentType.GetErrorString(Addr, "active", 'i', m.Data[0].Type));
return;
}
if (m.Data[1].Type != 's')
{
GD.Print(InvalidArgumentType.GetErrorString(addr, "name", 's', m.Data[1].Type));
GD.Print(InvalidArgumentType.GetErrorString(Addr, "name", 's', m.Data[1].Type));
return;
}
if (m.Data[2].Type != 'i')
{
GD.Print(InvalidArgumentType.GetErrorString(addr, "IsLeft", 'i', m.Data[2].Type));
GD.Print(InvalidArgumentType.GetErrorString(Addr, "IsLeft", 'i', m.Data[2].Type));
}
if (m.Data[3].Type != 'i')
{
GD.Print(InvalidArgumentType.GetErrorString(addr, "IsTouch", 'i', m.Data[3].Type));
GD.Print(InvalidArgumentType.GetErrorString(Addr, "IsTouch", 'i', m.Data[3].Type));
}
if (m.Data[4].Type != 'i')
{
GD.Print(InvalidArgumentType.GetErrorString(addr, "IsAxis", 'i', m.Data[4].Type));
GD.Print(InvalidArgumentType.GetErrorString(Addr, "IsAxis", 'i', m.Data[4].Type));
}
if (m.Data[5].Type != 'f')
{
GD.Print(InvalidArgumentType.GetErrorString(addr, "Axis.x", 'f', m.Data[5].Type));
GD.Print(InvalidArgumentType.GetErrorString(Addr, "Axis.x", 'f', m.Data[5].Type));
}
if (m.Data[6].Type != 'f')
{
GD.Print(InvalidArgumentType.GetErrorString(addr, "Axis.y", 'f', m.Data[6].Type));
GD.Print(InvalidArgumentType.GetErrorString(Addr, "Axis.y", 'f', m.Data[6].Type));
}
if (m.Data[7].Type != 'f')
{
GD.Print(InvalidArgumentType.GetErrorString(addr, "Axis.z", 'f', m.Data[7].Type));
GD.Print(InvalidArgumentType.GetErrorString(Addr, "Axis.z", 'f', m.Data[7].Type));
}
if ((int)m.Data[0].Value < 0 || (int)m.Data[0].Value > 2)
{
@ -88,7 +88,7 @@ namespace godotVmcSharp
{
if (active < 0 || active > 2)
{
GD.Print($"Invalid value for \"active\" 'i' argument of {addr}. Expected 0-2, received {active}");
GD.Print($"Invalid value for \"active\" 'i' argument of {Addr}. Expected 0-2, received {active}");
return;
}
Active = active;
@ -101,7 +101,7 @@ namespace godotVmcSharp
public new OscMessage ToMessage()
{
return new OscMessage(addr, new System.Collections.Generic.List<OscArgument>{
return new OscMessage(Addr, new System.Collections.Generic.List<OscArgument>{
new OscArgument(Active, 'i'),
new OscArgument(Name, 's'),
new OscArgument(IsLeft, 'i'),

View File

@ -29,12 +29,12 @@ namespace godotVmcSharp
{
if (m.Data.Count != 1)
{
GD.Print($"Invalid number of arguments for {addr}. Expecting 1, received {m.Data.Count}");
GD.Print($"Invalid number of arguments for {Addr}. Expecting 1, received {m.Data.Count}");
return;
}
if (m.Data[0].Type != 's')
{
GD.Print(InvalidArgumentType.GetErrorString(addr, "path", 's', m.Data[0].Type));
GD.Print(InvalidArgumentType.GetErrorString(Addr, "path", 's', m.Data[0].Type));
return;
}
Path = (string)m.Data[0].Value;
@ -47,7 +47,7 @@ namespace godotVmcSharp
public new OscMessage ToMessage()
{
return new OscMessage(addr, new System.Collections.Generic.List<OscArgument> { new OscArgument(Path, 's') });
return new OscMessage(Addr, new System.Collections.Generic.List<OscArgument> { new OscArgument(Path, 's') });
}
}
}

View File

@ -30,54 +30,54 @@ namespace godotVmcSharp
{
if (m.Data.Count != 8)
{
GD.Print($"Invalid number of arguments for {base.addr}. Expected 8, received {m.Data.Count}.");
GD.Print($"Invalid number of arguments for {base.Addr}. Expected 8, received {m.Data.Count}.");
return;
}
if (m.Data[0].Type != 's')
{
GD.Print(InvalidArgumentType.GetErrorString(addr, "serial", 's', m.Data[0].Type));
GD.Print(InvalidArgumentType.GetErrorString(Addr, "serial", 's', m.Data[0].Type));
return;
}
if (m.Data[1].Type != 'f')
{
GD.Print(InvalidArgumentType.GetErrorString(addr, "p.x", 'f', m.Data[1].Type));
GD.Print(InvalidArgumentType.GetErrorString(Addr, "p.x", 'f', m.Data[1].Type));
return;
}
if (m.Data[2].Type != 'f')
{
GD.Print(InvalidArgumentType.GetErrorString(addr, "p.y", 'f', m.Data[2].Type));
GD.Print(InvalidArgumentType.GetErrorString(Addr, "p.y", 'f', m.Data[2].Type));
return;
}
if (m.Data[3].Type != 'f')
{
GD.Print(InvalidArgumentType.GetErrorString(addr, "p.z", 'f', m.Data[3].Type));
GD.Print(InvalidArgumentType.GetErrorString(Addr, "p.z", 'f', m.Data[3].Type));
return;
}
if (m.Data[4].Type != 'f')
{
GD.Print(InvalidArgumentType.GetErrorString(addr, "q.x", 'f', m.Data[4].Type));
GD.Print(InvalidArgumentType.GetErrorString(Addr, "q.x", 'f', m.Data[4].Type));
return;
}
if (m.Data[5].Type != 'f')
{
GD.Print(InvalidArgumentType.GetErrorString(addr, "q.y", 'f', m.Data[5].Type));
GD.Print(InvalidArgumentType.GetErrorString(Addr, "q.y", 'f', m.Data[5].Type));
return;
}
if (m.Data[6].Type != 'f')
{
GD.Print(InvalidArgumentType.GetErrorString(addr, "q.z", 'f', m.Data[6].Type));
GD.Print(InvalidArgumentType.GetErrorString(Addr, "q.z", 'f', m.Data[6].Type));
return;
}
if (m.Data[7].Type != 'f')
{
GD.Print(InvalidArgumentType.GetErrorString(addr, "q.w", 'f', m.Data[7].Type));
GD.Print(InvalidArgumentType.GetErrorString(Addr, "q.w", 'f', m.Data[7].Type));
return;
}
Serial = (string)m.Data[0].Value;
Transform = new Transform3D(new Basis(new Quaternion((float)m.Data[4].Value, (float)m.Data[5].Value, (float)m.Data[6].Value, (float)m.Data[7].Value)), new Vector3((float)m.Data[1].Value, (float)m.Data[2].Value, (float)m.Data[3].Value));
}
public VmcExtDevicePos(OscAddress addr, string serial, Transform3D transform) : base(addr)
public VmcExtDevicePos(OscAddress Addr, string serial, Transform3D transform) : base(Addr)
{
Serial = serial;
Transform = transform;
@ -86,7 +86,7 @@ namespace godotVmcSharp
public new OscMessage ToMessage()
{
var quat = Transform.Basis.GetRotationQuaternion();
return new OscMessage(addr, new System.Collections.Generic.List<OscArgument>{
return new OscMessage(Addr, new System.Collections.Generic.List<OscArgument>{
new OscArgument(Serial, 's'),
new OscArgument(Transform.Origin.X, 'f'),
new OscArgument(Transform.Origin.Y, 'f'),

View File

@ -30,22 +30,22 @@ namespace godotVmcSharp
{
if (m.Data[0].Type != 'i')
{
GD.Print(InvalidArgumentType.GetErrorString(addr, "active", 'i', m.Data[0].Type));
GD.Print(InvalidArgumentType.GetErrorString(Addr, "active", 'i', m.Data[0].Type));
return;
}
if (m.Data[1].Type != 's')
{
GD.Print(InvalidArgumentType.GetErrorString(addr, "name", 's', m.Data[1].Type));
GD.Print(InvalidArgumentType.GetErrorString(Addr, "name", 's', m.Data[1].Type));
return;
}
if (m.Data[2].Type != 'i')
{
GD.Print(InvalidArgumentType.GetErrorString(addr, "keycode", 'i', m.Data[2].Type));
GD.Print(InvalidArgumentType.GetErrorString(Addr, "keycode", 'i', m.Data[2].Type));
return;
}
if ((int)m.Data[0].Value < 0 || (int)m.Data[0].Value > 1)
{
GD.Print($"Invalid value for \"active\" 'i' argument of {addr}. Expected 0 or 1, received {(int)m.Data[0].Value}");
GD.Print($"Invalid value for \"active\" 'i' argument of {Addr}. Expected 0 or 1, received {(int)m.Data[0].Value}");
return;
}
Active = (int)m.Data[0].Value;
@ -57,7 +57,7 @@ namespace godotVmcSharp
{
if (active < 0 || active > 1)
{
GD.Print($"Invalid value for \"active\" 'i' argument of {addr}. Expected 0 or 1, received {active}");
GD.Print($"Invalid value for \"active\" 'i' argument of {Addr}. Expected 0 or 1, received {active}");
return;
}
Active = active;
@ -67,7 +67,7 @@ namespace godotVmcSharp
public new OscMessage ToMessage()
{
return new OscMessage(addr, new System.Collections.Generic.List<OscArgument>{
return new OscMessage(Addr, new System.Collections.Generic.List<OscArgument>{
new OscArgument(Active, 'i'),
new OscArgument(Name, 's'),
new OscArgument(Keycode, 'i')

View File

@ -32,67 +32,67 @@ namespace godotVmcSharp
{
if (m.Data.Count != 12)
{
GD.Print($"Invalid number of arguments for {base.addr}. Expected 12, received {m.Data.Count}.");
GD.Print($"Invalid number of arguments for {base.Addr}. Expected 12, received {m.Data.Count}.");
return;
}
if (m.Data[0].Type != 's')
{
GD.Print(InvalidArgumentType.GetErrorString(addr, "name", 's', m.Data[0].Type));
GD.Print(InvalidArgumentType.GetErrorString(Addr, "name", 's', m.Data[0].Type));
return;
}
if (m.Data[1].Type != 'f')
{
GD.Print(InvalidArgumentType.GetErrorString(addr, "p.x", 'f', m.Data[1].Type));
GD.Print(InvalidArgumentType.GetErrorString(Addr, "p.x", 'f', m.Data[1].Type));
return;
}
if (m.Data[2].Type != 'f')
{
GD.Print(InvalidArgumentType.GetErrorString(addr, "p.y", 'f', m.Data[2].Type));
GD.Print(InvalidArgumentType.GetErrorString(Addr, "p.y", 'f', m.Data[2].Type));
return;
}
if (m.Data[3].Type != 'f')
{
GD.Print(InvalidArgumentType.GetErrorString(addr, "p.z", 'f', m.Data[3].Type));
GD.Print(InvalidArgumentType.GetErrorString(Addr, "p.z", 'f', m.Data[3].Type));
return;
}
if (m.Data[4].Type != 'f')
{
GD.Print(InvalidArgumentType.GetErrorString(addr, "q.x", 'f', m.Data[4].Type));
GD.Print(InvalidArgumentType.GetErrorString(Addr, "q.x", 'f', m.Data[4].Type));
return;
}
if (m.Data[5].Type != 'f')
{
GD.Print(InvalidArgumentType.GetErrorString(addr, "q.y", 'f', m.Data[5].Type));
GD.Print(InvalidArgumentType.GetErrorString(Addr, "q.y", 'f', m.Data[5].Type));
return;
}
if (m.Data[6].Type != 'f')
{
GD.Print(InvalidArgumentType.GetErrorString(addr, "q.z", 'f', m.Data[6].Type));
GD.Print(InvalidArgumentType.GetErrorString(Addr, "q.z", 'f', m.Data[6].Type));
return;
}
if (m.Data[7].Type != 'f')
{
GD.Print(InvalidArgumentType.GetErrorString(addr, "q.w", 'f', m.Data[7].Type));
GD.Print(InvalidArgumentType.GetErrorString(Addr, "q.w", 'f', m.Data[7].Type));
return;
}
if (m.Data[8].Type != 'f')
{
GD.Print(InvalidArgumentType.GetErrorString(addr, "color.red", 'f', m.Data[8].Type));
GD.Print(InvalidArgumentType.GetErrorString(Addr, "color.red", 'f', m.Data[8].Type));
return;
}
if (m.Data[9].Type != 'f')
{
GD.Print(InvalidArgumentType.GetErrorString(addr, "color.blue", 'f', m.Data[9].Type));
GD.Print(InvalidArgumentType.GetErrorString(Addr, "color.blue", 'f', m.Data[9].Type));
return;
}
if (m.Data[10].Type != 'f')
{
GD.Print(InvalidArgumentType.GetErrorString(addr, "color.green", 'f', m.Data[10].Type));
GD.Print(InvalidArgumentType.GetErrorString(Addr, "color.green", 'f', m.Data[10].Type));
return;
}
if (m.Data[11].Type != 'f')
{
GD.Print(InvalidArgumentType.GetErrorString(addr, "color.alpha", 'f', m.Data[11].Type));
GD.Print(InvalidArgumentType.GetErrorString(Addr, "color.alpha", 'f', m.Data[11].Type));
return;
}
Name = (string)m.Data[0].Value;
@ -110,7 +110,7 @@ namespace godotVmcSharp
public new OscMessage ToMessage()
{
var quat = Transform.Basis.GetRotationQuaternion();
return new OscMessage(addr, new List<OscArgument>{
return new OscMessage(Addr, new List<OscArgument>{
new OscArgument(Name, 's'),
new OscArgument(Transform.Origin.X, 'f'),
new OscArgument(Transform.Origin.Y, 'f'),

View File

@ -29,17 +29,17 @@ namespace godotVmcSharp
{
if (m.Data[0].Type != 'i')
{
GD.Print(InvalidArgumentType.GetErrorString(addr, "knob", 'i', m.Data[0].Type));
GD.Print(InvalidArgumentType.GetErrorString(Addr, "knob", 'i', m.Data[0].Type));
return;
}
if (m.Data[1].Type != 'i')
{
GD.Print(InvalidArgumentType.GetErrorString(addr, "active", 'i', m.Data[1].Type));
GD.Print(InvalidArgumentType.GetErrorString(Addr, "active", 'i', m.Data[1].Type));
return;
}
if ((int)m.Data[1].Value < 0 || (int)m.Data[1].Value > 1)
{
GD.Print($"Invalid value for \"active\" argument of {addr}. Expected 0 or 1, received {(int)m.Data[1].Value}.");
GD.Print($"Invalid value for \"active\" argument of {Addr}. Expected 0 or 1, received {(int)m.Data[1].Value}.");
return;
}
Knob = (int)m.Data[0].Value;
@ -50,7 +50,7 @@ namespace godotVmcSharp
{
if (active < 0 || active > 1)
{
GD.Print($"Invalid value for \"active\" argument of {addr}. Expected 0 or 1, received {active}.");
GD.Print($"Invalid value for \"active\" argument of {Addr}. Expected 0 or 1, received {active}.");
return;
}
Knob = knob;
@ -59,7 +59,7 @@ namespace godotVmcSharp
public new OscMessage ToMessage()
{
return new OscMessage(addr, new System.Collections.Generic.List<OscArgument>{
return new OscMessage(Addr, new System.Collections.Generic.List<OscArgument>{
new OscArgument(Knob, 'i'),
new OscArgument(Active, 'i')
});

View File

@ -29,12 +29,12 @@ namespace godotVmcSharp
{
if (m.Data[0].Type != 'i')
{
GD.Print(InvalidArgumentType.GetErrorString(addr, "knob", 'i', m.Data[0].Type));
GD.Print(InvalidArgumentType.GetErrorString(Addr, "knob", 'i', m.Data[0].Type));
return;
}
if (m.Data[1].Type != 'f')
{
GD.Print(InvalidArgumentType.GetErrorString(addr, "value", 'f', m.Data[1].Type));
GD.Print(InvalidArgumentType.GetErrorString(Addr, "value", 'f', m.Data[1].Type));
return;
}
Knob = (int)m.Data[0].Value;
@ -49,7 +49,7 @@ namespace godotVmcSharp
public new OscMessage ToMessage()
{
return new OscMessage(addr, new System.Collections.Generic.List<OscArgument>{
return new OscMessage(Addr, new System.Collections.Generic.List<OscArgument>{
new OscArgument(Knob, 'i'),
new OscArgument(Value, 'f')
});

View File

@ -32,27 +32,27 @@ namespace godotVmcSharp
{
if (m.Data[0].Type != 'i')
{
GD.Print(InvalidArgumentType.GetErrorString(addr, "active", 'i', m.Data[0].Type));
GD.Print(InvalidArgumentType.GetErrorString(Addr, "active", 'i', m.Data[0].Type));
return;
}
if (m.Data[1].Type != 'i')
{
GD.Print(InvalidArgumentType.GetErrorString(addr, "channel", 'i', m.Data[1].Type));
GD.Print(InvalidArgumentType.GetErrorString(Addr, "channel", 'i', m.Data[1].Type));
return;
}
if (m.Data[2].Type != 'i')
{
GD.Print(InvalidArgumentType.GetErrorString(addr, "note", 'i', m.Data[2].Type));
GD.Print(InvalidArgumentType.GetErrorString(Addr, "note", 'i', m.Data[2].Type));
return;
}
if (m.Data[3].Type != 'f')
{
GD.Print(InvalidArgumentType.GetErrorString(addr, "velocity", 'f', m.Data[4].Type));
GD.Print(InvalidArgumentType.GetErrorString(Addr, "velocity", 'f', m.Data[4].Type));
return;
}
if ((int)m.Data[0].Value < 0 || (int)m.Data[0].Value > 1)
{
GD.Print($"Invalid value for \"active\" 'i' argument of {addr}. Expected 0 or 1, received {(int)m.Data[0].Value}");
GD.Print($"Invalid value for \"active\" 'i' argument of {Addr}. Expected 0 or 1, received {(int)m.Data[0].Value}");
return;
}
Active = (int)m.Data[0].Value;
@ -65,7 +65,7 @@ namespace godotVmcSharp
{
if (active < 0 || active > 1)
{
GD.Print($"Invalid value for \"active\" 'i' argument of {addr}. Expected 0 or 1, received {Active}.");
GD.Print($"Invalid value for \"active\" 'i' argument of {Addr}. Expected 0 or 1, received {Active}.");
return;
}
Active = active;
@ -76,7 +76,7 @@ namespace godotVmcSharp
public new OscMessage ToMessage()
{
return new OscMessage(addr, new System.Collections.Generic.List<OscArgument>{
return new OscMessage(Addr, new System.Collections.Generic.List<OscArgument>{
new OscArgument(Active, 'i'),
new OscArgument(Channel, 'i'),
new OscArgument(Note, 'i'),

View File

@ -192,19 +192,19 @@ namespace godotVmcSharp
{
if (CalibrationState == null)
{
return new OscMessage(addr, new List<OscArgument>{
return new OscMessage(Addr, new List<OscArgument>{
new OscArgument(Loaded, 'i')
});
}
if (TrackingStatus == null)
{
return new OscMessage(addr, new List<OscArgument>{
return new OscMessage(Addr, new List<OscArgument>{
new OscArgument(Loaded, 'i'),
new OscArgument(CalibrationState, 'i'),
new OscArgument(CalibrationMode, 'i')
});
}
return new OscMessage(addr, new List<OscArgument>{
return new OscMessage(Addr, new List<OscArgument>{
new OscArgument(Loaded, 'i'),
new OscArgument(CalibrationState, 'i'),
new OscArgument(CalibrationMode, 'i'),

View File

@ -29,12 +29,12 @@ namespace godotVmcSharp
{
if (m.Data.Count != 1)
{
GD.Print($"Invalid number of arguments for {addr}. Expecting 1, received {m.Data.Count}");
GD.Print($"Invalid number of arguments for {Addr}. Expecting 1, received {m.Data.Count}");
return;
}
if (m.Data[0].Type != 's')
{
GD.Print(InvalidArgumentType.GetErrorString(addr, "option", 's', m.Data[0].Type));
GD.Print(InvalidArgumentType.GetErrorString(Addr, "option", 's', m.Data[0].Type));
return;
}
option = (string)m.Data[0].Value;
@ -47,7 +47,7 @@ namespace godotVmcSharp
public new OscMessage ToMessage()
{
return new OscMessage(addr, new System.Collections.Generic.List<OscArgument>{new OscArgument(option, 's')});
return new OscMessage(Addr, new System.Collections.Generic.List<OscArgument>{new OscArgument(option, 's')});
}
}
}

View File

@ -32,27 +32,27 @@ namespace godotVmcSharp
{
if (m.Data.Count > 3 || m.Data.Count < 2)
{
GD.Print($"Invalid number of arguments for {addr}. Expecting 2 or 3, received {m.Data.Count}");
GD.Print($"Invalid number of arguments for {Addr}. Expecting 2 or 3, received {m.Data.Count}");
return;
}
if (m.Data[0].Type != 'i')
{
GD.Print(InvalidArgumentType.GetErrorString(addr, "enable", 'i', m.Data[0].Type));
GD.Print(InvalidArgumentType.GetErrorString(Addr, "enable", 'i', m.Data[0].Type));
return;
}
if (m.Data[1].Type != 'i')
{
GD.Print(InvalidArgumentType.GetErrorString(addr, "port", 'i', m.Data[0].Type));
GD.Print(InvalidArgumentType.GetErrorString(Addr, "port", 'i', m.Data[0].Type));
return;
}
if ((int)m.Data[0].Value < 0 || (int)m.Data[0].Value > 1)
{
GD.Print($"Invalid value for \"enable\" argument of {addr}. Expected 0 or 1, received {(int)m.Data[0].Value}.");
GD.Print($"Invalid value for \"enable\" argument of {Addr}. Expected 0 or 1, received {(int)m.Data[0].Value}.");
return;
}
if ((int)m.Data[1].Value < 0 || (int)m.Data[1].Value > 65535)
{
GD.Print($"Invalid value for \"port\" argument of {addr}. Expected 0-65535, received {(int)m.Data[1].Value}.");
GD.Print($"Invalid value for \"port\" argument of {Addr}. Expected 0-65535, received {(int)m.Data[1].Value}.");
return;
}
Enable = (int)m.Data[0].Value;
@ -64,7 +64,7 @@ namespace godotVmcSharp
}
if (m.Data[2].Type != 's')
{
GD.Print(InvalidArgumentType.GetErrorString(addr, "IpAddress", 's', m.Data[2].Type));
GD.Print(InvalidArgumentType.GetErrorString(Addr, "IpAddress", 's', m.Data[2].Type));
return;
}
IpAddress = (string)m.Data[2].Value;
@ -74,12 +74,12 @@ namespace godotVmcSharp
{
if (enable < 0 || enable > 1)
{
GD.Print($"Invalid value for \"enable\" argument of {addr}. Expected 0 or 1, received {enable}.");
GD.Print($"Invalid value for \"enable\" argument of {Addr}. Expected 0 or 1, received {enable}.");
return;
}
if (port < 0 || port > 65535)
{
GD.Print($"Invalid value for \"port\" argument of {addr}. Expected 0-65535, received {port}.");
GD.Print($"Invalid value for \"port\" argument of {Addr}. Expected 0-65535, received {port}.");
return;
}
Enable = enable;
@ -91,12 +91,12 @@ namespace godotVmcSharp
{
if (enable < 0 || enable > 1)
{
GD.Print($"Invalid value for \"enable\" argument of {addr}. Expected 0 or 1, received {enable}.");
GD.Print($"Invalid value for \"enable\" argument of {Addr}. Expected 0 or 1, received {enable}.");
return;
}
if (port < 0 || port > 65535)
{
GD.Print($"Invalid value for \"port\" argument of {addr}. Expected 0-65535, received {port}.");
GD.Print($"Invalid value for \"port\" argument of {Addr}. Expected 0-65535, received {port}.");
return;
}
Enable = enable;
@ -108,12 +108,12 @@ namespace godotVmcSharp
{
if (IpAddress == "")
{
return new OscMessage(addr, new List<OscArgument>{
return new OscMessage(Addr, new List<OscArgument>{
new OscArgument(Enable, 'i'),
new OscArgument(Port, 'i'),
});
}
return new OscMessage(addr, new List<OscArgument>{
return new OscMessage(Addr, new List<OscArgument>{
new OscArgument(Enable, 'i'),
new OscArgument(Port, 'i'),
new OscArgument(IpAddress, 's'),

View File

@ -30,17 +30,17 @@ namespace godotVmcSharp
{
if (m.Data.Count != 2)
{
GD.Print($"Invalid number of arguments for {addr} message. Expected 2 but received {m.Data.Count}");
GD.Print($"Invalid number of arguments for {Addr} message. Expected 2 but received {m.Data.Count}");
return;
}
if (m.Data[0].Type != 's')
{
GD.Print(InvalidArgumentType.GetErrorString(addr, "service", 's', m.Data[0].Type));
GD.Print(InvalidArgumentType.GetErrorString(Addr, "service", 's', m.Data[0].Type));
return;
}
if (m.Data[1].Type != 's')
{
GD.Print(InvalidArgumentType.GetErrorString(addr, "json", 's', m.Data[1].Type));
GD.Print(InvalidArgumentType.GetErrorString(Addr, "json", 's', m.Data[1].Type));
return;
}
Service = (string)m.Data[0].Value;
@ -55,7 +55,7 @@ namespace godotVmcSharp
public new OscMessage ToMessage()
{
return new OscMessage(addr, new System.Collections.Generic.List<OscArgument>{
return new OscMessage(Addr, new System.Collections.Generic.List<OscArgument>{
new OscArgument(Service, 's'),
new OscArgument(Json, 's')
});

View File

@ -54,7 +54,7 @@ namespace godotVmcSharp
Offset = new Vector3((float)m.Data[11].Value, (float)m.Data[12].Value, (float)m.Data[13].Value);
break;
default:
GD.Print($"Invalid number of arguments for {addr}. Expected 8 or 14, received {m.Data.Count}.");
GD.Print($"Invalid number of arguments for {Addr}. Expected 8 or 14, received {m.Data.Count}.");
return;
}
}
@ -77,42 +77,42 @@ namespace godotVmcSharp
{
if (data[0].Type != 's')
{
GD.Print(InvalidArgumentType.GetErrorString(addr, "name", 's', data[0].Type));
GD.Print(InvalidArgumentType.GetErrorString(Addr, "name", 's', data[0].Type));
return false;
}
if (data[1].Type != 'f')
{
GD.Print(InvalidArgumentType.GetErrorString(addr, "p.x", 'f', data[1].Type));
GD.Print(InvalidArgumentType.GetErrorString(Addr, "p.x", 'f', data[1].Type));
return false;
}
if (data[2].Type != 'f')
{
GD.Print(InvalidArgumentType.GetErrorString(addr, "p.y", 'f', data[2].Type));
GD.Print(InvalidArgumentType.GetErrorString(Addr, "p.y", 'f', data[2].Type));
return false;
}
if (data[3].Type != 'f')
{
GD.Print(InvalidArgumentType.GetErrorString(addr, "p.z", 'f', data[3].Type));
GD.Print(InvalidArgumentType.GetErrorString(Addr, "p.z", 'f', data[3].Type));
return false;
}
if (data[4].Type != 'f')
{
GD.Print(InvalidArgumentType.GetErrorString(addr, "q.x", 'f', data[4].Type));
GD.Print(InvalidArgumentType.GetErrorString(Addr, "q.x", 'f', data[4].Type));
return false;
}
if (data[5].Type != 'f')
{
GD.Print(InvalidArgumentType.GetErrorString(addr, "q.y", 'f', data[5].Type));
GD.Print(InvalidArgumentType.GetErrorString(Addr, "q.y", 'f', data[5].Type));
return false;
}
if (data[6].Type != 'f')
{
GD.Print(InvalidArgumentType.GetErrorString(addr, "q.z", 'f', data[6].Type));
GD.Print(InvalidArgumentType.GetErrorString(Addr, "q.z", 'f', data[6].Type));
return false;
}
if (data[7].Type != 'f')
{
GD.Print(InvalidArgumentType.GetErrorString(addr, "q.w", 'f', data[7].Type));
GD.Print(InvalidArgumentType.GetErrorString(Addr, "q.w", 'f', data[7].Type));
return false;
}
return true;
@ -126,32 +126,32 @@ namespace godotVmcSharp
}
if (data[8].Type != 'f')
{
GD.Print(InvalidArgumentType.GetErrorString(addr, "s.x", 'f', data[8].Type));
GD.Print(InvalidArgumentType.GetErrorString(Addr, "s.x", 'f', data[8].Type));
return false;
}
if (data[9].Type != 'f')
{
GD.Print(InvalidArgumentType.GetErrorString(addr, "s.y", 'f', data[9].Type));
GD.Print(InvalidArgumentType.GetErrorString(Addr, "s.y", 'f', data[9].Type));
return false;
}
if (data[10].Type != 'f')
{
GD.Print(InvalidArgumentType.GetErrorString(addr, "s.z", 'f', data[10].Type));
GD.Print(InvalidArgumentType.GetErrorString(Addr, "s.z", 'f', data[10].Type));
return false;
}
if (data[11].Type != 'f')
{
GD.Print(InvalidArgumentType.GetErrorString(addr, "o.x", 'f', data[11].Type));
GD.Print(InvalidArgumentType.GetErrorString(Addr, "o.x", 'f', data[11].Type));
return false;
}
if (data[12].Type != 'f')
{
GD.Print(InvalidArgumentType.GetErrorString(addr, "o.y", 'f', data[12].Type));
GD.Print(InvalidArgumentType.GetErrorString(Addr, "o.y", 'f', data[12].Type));
return false;
}
if (data[13].Type != 'f')
{
GD.Print(InvalidArgumentType.GetErrorString(addr, "o.z", 'f', data[13].Type));
GD.Print(InvalidArgumentType.GetErrorString(Addr, "o.z", 'f', data[13].Type));
return false;
}
return true;
@ -162,7 +162,7 @@ namespace godotVmcSharp
var quat = Transform.Basis.GetRotationQuaternion();
if (!Scale.HasValue)
{
return new OscMessage(addr, new List<OscArgument>{
return new OscMessage(Addr, new List<OscArgument>{
new OscArgument(Name, 's'),
new OscArgument(Transform.Origin.X, 'f'),
new OscArgument(Transform.Origin.Y, 'f'),
@ -173,7 +173,7 @@ namespace godotVmcSharp
new OscArgument(quat.W, 'f'),
});
}
return new OscMessage(addr, new List<OscArgument>{
return new OscMessage(Addr, new List<OscArgument>{
new OscArgument(Name, 's'),
new OscArgument(Transform.Origin.X, 'f'),
new OscArgument(Transform.Origin.Y, 'f'),

View File

@ -29,12 +29,12 @@ namespace godotVmcSharp
{
if (m.Data.Count != 1)
{
GD.Print($"Invalid number of arguments for {addr}. Expecting 1, received {m.Data.Count}");
GD.Print($"Invalid number of arguments for {Addr}. Expecting 1, received {m.Data.Count}");
return;
}
if (m.Data[0].Type != 'i')
{
GD.Print(InvalidArgumentType.GetErrorString(addr, "mode", 'i', m.Data[0].Type));
GD.Print(InvalidArgumentType.GetErrorString(Addr, "mode", 'i', m.Data[0].Type));
return;
}
if ((int)m.Data[0].Value < 0 || (int)m.Data[0].Value > 2)
@ -57,7 +57,7 @@ namespace godotVmcSharp
public new OscMessage ToMessage()
{
return new OscMessage(addr, new System.Collections.Generic.List<OscArgument>{new OscArgument(Mode, 'i')});
return new OscMessage(Addr, new System.Collections.Generic.List<OscArgument>{new OscArgument(Mode, 'i')});
}
}
}

View File

@ -29,12 +29,12 @@ namespace godotVmcSharp
{
if (m.Data.Count != 1)
{
GD.Print($"Invalid number of arguments for {addr}. Expecting 1, received {m.Data.Count}");
GD.Print($"Invalid number of arguments for {Addr}. Expecting 1, received {m.Data.Count}");
return;
}
if (m.Data[0].Type != 's')
{
GD.Print(InvalidArgumentType.GetErrorString(addr, "path", 's', m.Data[0].Type));
GD.Print(InvalidArgumentType.GetErrorString(Addr, "path", 's', m.Data[0].Type));
return;
}
Path = (string)m.Data[0].Value;
@ -47,7 +47,7 @@ namespace godotVmcSharp
public new OscMessage ToMessage()
{
return new OscMessage(addr, new System.Collections.Generic.List<OscArgument>{new OscArgument(Path, 's')});
return new OscMessage(Addr, new System.Collections.Generic.List<OscArgument>{new OscArgument(Path, 's')});
}
}
}

View File

@ -30,27 +30,27 @@ namespace godotVmcSharp
{
if (m.Data.Count != 4)
{
GD.Print($"Invalid number of arguments for {addr}. Expecting 4, received {m.Data.Count}");
GD.Print($"Invalid number of arguments for {Addr}. Expecting 4, received {m.Data.Count}");
return;
}
if (m.Data[0].Type != 'i')
{
GD.Print(InvalidArgumentType.GetErrorString(addr, "enable", 'i', m.Data[0].Type));
GD.Print(InvalidArgumentType.GetErrorString(Addr, "enable", 'i', m.Data[0].Type));
return;
}
if (m.Data[1].Type != 'f')
{
GD.Print(InvalidArgumentType.GetErrorString(addr, "p.x", 'f', m.Data[1].Type));
GD.Print(InvalidArgumentType.GetErrorString(Addr, "p.x", 'f', m.Data[1].Type));
return;
}
if (m.Data[2].Type != 'f')
{
GD.Print(InvalidArgumentType.GetErrorString(addr, "p.y", 'f', m.Data[2].Type));
GD.Print(InvalidArgumentType.GetErrorString(Addr, "p.y", 'f', m.Data[2].Type));
return;
}
if (m.Data[3].Type != 'f')
{
GD.Print(InvalidArgumentType.GetErrorString(addr, "p.z", 'f', m.Data[3].Type));
GD.Print(InvalidArgumentType.GetErrorString(Addr, "p.z", 'f', m.Data[3].Type));
return;
}
Enable = (int)m.Data[0].Value;
@ -65,7 +65,7 @@ namespace godotVmcSharp
public new OscMessage ToMessage()
{
return new OscMessage(addr, new System.Collections.Generic.List<OscArgument>{
return new OscMessage(Addr, new System.Collections.Generic.List<OscArgument>{
new OscArgument(Enable, 'i'),
new OscArgument(Position.X, 'f'),
new OscArgument(Position.Y, 'f'),

View File

@ -34,37 +34,37 @@ namespace godotVmcSharp
{
if (m.Data.Count != 6)
{
GD.Print($"Invalid number of arguments for {addr}. Expecting 6, received {m.Data.Count}");
GD.Print($"Invalid number of arguments for {Addr}. Expecting 6, received {m.Data.Count}");
return;
}
if (m.Data[0].Type != 'i')
{
GD.Print(InvalidArgumentType.GetErrorString(addr, "status", 'i', m.Data[0].Type));
GD.Print(InvalidArgumentType.GetErrorString(Addr, "status", 'i', m.Data[0].Type));
return;
}
if (m.Data[1].Type != 'i')
{
GD.Print(InvalidArgumentType.GetErrorString(addr, "root", 'i', m.Data[1].Type));
GD.Print(InvalidArgumentType.GetErrorString(Addr, "root", 'i', m.Data[1].Type));
return;
}
if (m.Data[2].Type != 'i')
{
GD.Print(InvalidArgumentType.GetErrorString(addr, "bone", 'i', m.Data[2].Type));
GD.Print(InvalidArgumentType.GetErrorString(Addr, "bone", 'i', m.Data[2].Type));
return;
}
if (m.Data[3].Type != 'i')
{
GD.Print(InvalidArgumentType.GetErrorString(addr, "blendShape", 'i', m.Data[3].Type));
GD.Print(InvalidArgumentType.GetErrorString(Addr, "blendShape", 'i', m.Data[3].Type));
return;
}
if (m.Data[4].Type != 'i')
{
GD.Print(InvalidArgumentType.GetErrorString(addr, "camera", 'i', m.Data[4].Type));
GD.Print(InvalidArgumentType.GetErrorString(Addr, "camera", 'i', m.Data[4].Type));
return;
}
if (m.Data[5].Type != 'i')
{
GD.Print(InvalidArgumentType.GetErrorString(addr, "devices", 'i', m.Data[5].Type));
GD.Print(InvalidArgumentType.GetErrorString(Addr, "devices", 'i', m.Data[5].Type));
return;
}
Status = (int)m.Data[0].Value;
@ -87,7 +87,7 @@ namespace godotVmcSharp
public new OscMessage ToMessage()
{
return new OscMessage(addr, new System.Collections.Generic.List<OscArgument>{
return new OscMessage(Addr, new System.Collections.Generic.List<OscArgument>{
new OscArgument(Status, 'i'),
new OscArgument(Root, 'i'),
new OscArgument(Bone, 'i'),

View File

@ -30,12 +30,12 @@ namespace godotVmcSharp
{
if (m.Data.Count != 1)
{
GD.Print($"Invalid number of arguments for {addr}. Expecting 1, received {m.Data.Count}");
GD.Print($"Invalid number of arguments for {Addr}. Expecting 1, received {m.Data.Count}");
return;
}
if (m.Data[0].Type != 's')
{
GD.Print(InvalidArgumentType.GetErrorString(addr, "response", 's', m.Data[0].Type));
GD.Print(InvalidArgumentType.GetErrorString(Addr, "response", 's', m.Data[0].Type));
return;
}
Response = (string)m.Data[0].Value;
@ -48,7 +48,7 @@ namespace godotVmcSharp
public new OscMessage ToMessage()
{
return new OscMessage(addr, new System.Collections.Generic.List<OscArgument>{new OscArgument(Response, 's')});
return new OscMessage(Addr, new System.Collections.Generic.List<OscArgument>{new OscArgument(Response, 's')});
}
}
}

View File

@ -29,12 +29,12 @@ namespace godotVmcSharp
{
if (m.Data.Count != 1)
{
GD.Print($"Invalid number of arguments for {addr}. Expecting 1, received {m.Data.Count}");
GD.Print($"Invalid number of arguments for {Addr}. Expecting 1, received {m.Data.Count}");
return;
}
if (m.Data[0].Type != 's')
{
GD.Print(InvalidArgumentType.GetErrorString(addr, "shortcut", 's', m.Data[0].Type));
GD.Print(InvalidArgumentType.GetErrorString(Addr, "shortcut", 's', m.Data[0].Type));
return;
}
Shortcut = (string)m.Data[0].Value;
@ -47,7 +47,7 @@ namespace godotVmcSharp
public new OscMessage ToMessage()
{
return new OscMessage(addr, new System.Collections.Generic.List<OscArgument>{new OscArgument(Shortcut, 's')});
return new OscMessage(Addr, new System.Collections.Generic.List<OscArgument>{new OscArgument(Shortcut, 's')});
}
}
}

View File

@ -30,27 +30,27 @@ namespace godotVmcSharp
{
if (m.Data.Count != 4)
{
GD.Print($"Invalid number of arguments for {addr}. Expecting 4, received {m.Data.Count}");
GD.Print($"Invalid number of arguments for {Addr}. Expecting 4, received {m.Data.Count}");
return;
}
if (m.Data[0].Type != 'f')
{
GD.Print(InvalidArgumentType.GetErrorString(addr, "r", 'f', m.Data[0].Type));
GD.Print(InvalidArgumentType.GetErrorString(Addr, "r", 'f', m.Data[0].Type));
return;
}
if (m.Data[1].Type != 'f')
{
GD.Print(InvalidArgumentType.GetErrorString(addr, "g", 'f', m.Data[1].Type));
GD.Print(InvalidArgumentType.GetErrorString(Addr, "g", 'f', m.Data[1].Type));
return;
}
if (m.Data[2].Type != 'f')
{
GD.Print(InvalidArgumentType.GetErrorString(addr, "b", 'f', m.Data[2].Type));
GD.Print(InvalidArgumentType.GetErrorString(Addr, "b", 'f', m.Data[2].Type));
return;
}
if (m.Data[3].Type != 'f')
{
GD.Print(InvalidArgumentType.GetErrorString(addr, "a", 'f', m.Data[3].Type));
GD.Print(InvalidArgumentType.GetErrorString(Addr, "a", 'f', m.Data[3].Type));
return;
}
Color = new Godot.Color((float)m.Data[0].Value, (float)m.Data[1].Value, (float)m.Data[2].Value, (float)m.Data[3].Value);
@ -63,7 +63,7 @@ namespace godotVmcSharp
public OscMessage ToMessage()
{
return new OscMessage(addr, new System.Collections.Generic.List<OscArgument>{
return new OscMessage(Addr, new System.Collections.Generic.List<OscArgument>{
new OscArgument(Color.R, 'f'),
new OscArgument(Color.G, 'f'),
new OscArgument(Color.B, 'f'),

View File

@ -32,47 +32,47 @@ namespace godotVmcSharp
{
if (m.Data.Count != 4)
{
GD.Print($"Invalid number of arguments for {addr}. Expecting 4, received {m.Data.Count}");
GD.Print($"Invalid number of arguments for {Addr}. Expecting 4, received {m.Data.Count}");
return;
}
if (m.Data[0].Type != 'i')
{
GD.Print(InvalidArgumentType.GetErrorString(addr, "isTopMost", 'i', m.Data[0].Type));
GD.Print(InvalidArgumentType.GetErrorString(Addr, "isTopMost", 'i', m.Data[0].Type));
return;
}
if (m.Data[1].Type != 'i')
{
GD.Print(InvalidArgumentType.GetErrorString(addr, "isTransparent", 'i', m.Data[1].Type));
GD.Print(InvalidArgumentType.GetErrorString(Addr, "isTransparent", 'i', m.Data[1].Type));
return;
}
if (m.Data[2].Type != 'i')
{
GD.Print(InvalidArgumentType.GetErrorString(addr, "windowClickThrough", 'i', m.Data[2].Type));
GD.Print(InvalidArgumentType.GetErrorString(Addr, "windowClickThrough", 'i', m.Data[2].Type));
return;
}
if (m.Data[3].Type != 'i')
{
GD.Print(InvalidArgumentType.GetErrorString(addr, "hideBorder", 'i', m.Data[3].Type));
GD.Print(InvalidArgumentType.GetErrorString(Addr, "hideBorder", 'i', m.Data[3].Type));
return;
}
if ((int)m.Data[0].Value < 0 || (int)m.Data[0].Value > 1)
{
GD.Print($"Invalid value for \"isTopMost\" 'i' argument of {addr}. Expected 0 or 1, received {(int)m.Data[0].Value}");
GD.Print($"Invalid value for \"isTopMost\" 'i' argument of {Addr}. Expected 0 or 1, received {(int)m.Data[0].Value}");
return;
}
if ((int)m.Data[1].Value < 0 || (int)m.Data[1].Value > 1)
{
GD.Print($"Invalid value for \"isTransparent\" 'i' argument of {addr}. Expected 0 or 1, received {(int)m.Data[1].Value}");
GD.Print($"Invalid value for \"isTransparent\" 'i' argument of {Addr}. Expected 0 or 1, received {(int)m.Data[1].Value}");
return;
}
if ((int)m.Data[2].Value < 0 || (int)m.Data[2].Value > 1)
{
GD.Print($"Invalid value for \"windowClickThrough\" 'i' argument of {addr}. Expected 0 or 1, received {(int)m.Data[2].Value}");
GD.Print($"Invalid value for \"windowClickThrough\" 'i' argument of {Addr}. Expected 0 or 1, received {(int)m.Data[2].Value}");
return;
}
if ((int)m.Data[3].Value < 0 || (int)m.Data[3].Value > 1)
{
GD.Print($"Invalid value for \"hideBorder\" 'i' argument of {addr}. Expected 0 or 1, received {(int)m.Data[3].Value}");
GD.Print($"Invalid value for \"hideBorder\" 'i' argument of {Addr}. Expected 0 or 1, received {(int)m.Data[3].Value}");
return;
}
IsTopMost = (int)m.Data[0].Value;
@ -85,22 +85,22 @@ namespace godotVmcSharp
{
if (isTopMost < 0 || isTopMost > 1)
{
GD.Print($"Invalid value for \"isTopMost\" 'i' argument of {addr}. Expected 0 or 1, received {isTopMost}");
GD.Print($"Invalid value for \"isTopMost\" 'i' argument of {Addr}. Expected 0 or 1, received {isTopMost}");
return;
}
if (isTransparent < 0 || isTransparent > 1)
{
GD.Print($"Invalid value for \"isTransparent\" 'i' argument of {addr}. Expected 0 or 1, received {isTransparent}");
GD.Print($"Invalid value for \"isTransparent\" 'i' argument of {Addr}. Expected 0 or 1, received {isTransparent}");
return;
}
if (windowClickThrough < 0 || windowClickThrough > 1)
{
GD.Print($"Invalid value for \"windowClickThrough\" 'i' argument of {addr}. Expected 0 or 1, received {windowClickThrough}");
GD.Print($"Invalid value for \"windowClickThrough\" 'i' argument of {Addr}. Expected 0 or 1, received {windowClickThrough}");
return;
}
if (hideBorder < 0 || hideBorder > 1)
{
GD.Print($"Invalid value for \"hideBorder\" 'i' argument of {addr}. Expected 0 or 1, received {hideBorder}");
GD.Print($"Invalid value for \"hideBorder\" 'i' argument of {Addr}. Expected 0 or 1, received {hideBorder}");
return;
}
IsTopMost = isTopMost;
@ -111,7 +111,7 @@ namespace godotVmcSharp
public new OscMessage ToMessage()
{
return new OscMessage(addr, new System.Collections.Generic.List<OscArgument>{
return new OscMessage(Addr, new System.Collections.Generic.List<OscArgument>{
new OscArgument(IsTopMost, 'i'),
new OscArgument(IsTransparent, 'i'),
new OscArgument(WindowClickThrough, 'i'),

View File

@ -46,7 +46,7 @@ namespace godotVmcSharp
public new OscMessage ToMessage()
{
return new OscMessage(addr, new System.Collections.Generic.List<OscArgument>{
return new OscMessage(Addr, new System.Collections.Generic.List<OscArgument>{
new OscArgument(Time, 'f')
});
}

View File

@ -35,12 +35,12 @@ namespace godotVmcSharp
case 2:
if (m.Data[0].Type != 's')
{
GD.Print(InvalidArgumentType.GetErrorString(addr, "path", 's', m.Data[0].Type));
GD.Print(InvalidArgumentType.GetErrorString(Addr, "path", 's', m.Data[0].Type));
return;
}
if (m.Data[1].Type != 's')
{
GD.Print(InvalidArgumentType.GetErrorString(addr, "title", 's', m.Data[1].Type));
GD.Print(InvalidArgumentType.GetErrorString(Addr, "title", 's', m.Data[1].Type));
return;
}
Path = (string)m.Data[0].Value;
@ -50,17 +50,17 @@ namespace godotVmcSharp
case 3:
if (m.Data[0].Type != 's')
{
GD.Print(InvalidArgumentType.GetErrorString(addr, "path", 's', m.Data[0].Type));
GD.Print(InvalidArgumentType.GetErrorString(Addr, "path", 's', m.Data[0].Type));
return;
}
if (m.Data[1].Type != 's')
{
GD.Print(InvalidArgumentType.GetErrorString(addr, "title", 's', m.Data[1].Type));
GD.Print(InvalidArgumentType.GetErrorString(Addr, "title", 's', m.Data[1].Type));
return;
}
if (m.Data[2].Type != 's')
{
GD.Print(InvalidArgumentType.GetErrorString(addr, "hash", 's', m.Data[1].Type));
GD.Print(InvalidArgumentType.GetErrorString(Addr, "hash", 's', m.Data[1].Type));
return;
}
Path = (string)m.Data[0].Value;
@ -68,7 +68,7 @@ namespace godotVmcSharp
Hash = (string)m.Data[2].Value;
break;
default:
GD.Print($"Invalid number of arguments for {addr} message. Expected 2 or 3 but received {m.Data.Count}");
GD.Print($"Invalid number of arguments for {Addr} message. Expected 2 or 3 but received {m.Data.Count}");
return;
}
}
@ -91,12 +91,12 @@ namespace godotVmcSharp
{
if (Hash == null)
{
return new OscMessage(addr, new List<OscArgument>{
return new OscMessage(Addr, new List<OscArgument>{
new OscArgument(Path, 's'),
new OscArgument(Title, 's')
});
}
return new OscMessage(addr, new List<OscArgument>{
return new OscMessage(Addr, new List<OscArgument>{
new OscArgument(Path, 's'),
new OscArgument(Title, 's'),
new OscArgument(Hash, 's')