feat!: add Node3D to constructor for Marionette and Performer
This commit is contained in:
parent
c0f028bb55
commit
9201215b06
|
@ -29,8 +29,10 @@ namespace godotVmcSharp
|
||||||
private CameraReceiver cam;
|
private CameraReceiver cam;
|
||||||
private DeviceReceiver devices;
|
private DeviceReceiver devices;
|
||||||
private DirectionalLightReceiver lights;
|
private DirectionalLightReceiver lights;
|
||||||
public Marionette(int port)
|
private Node3D node;
|
||||||
|
public Marionette(int port, Node3D node)
|
||||||
{
|
{
|
||||||
|
this.node = node;
|
||||||
receiver = new OscReceiver(port);
|
receiver = new OscReceiver(port);
|
||||||
receiver.MessageReceived += (sender, e) =>
|
receiver.MessageReceived += (sender, e) =>
|
||||||
{
|
{
|
||||||
|
@ -46,6 +48,7 @@ namespace godotVmcSharp
|
||||||
};
|
};
|
||||||
devices = new DeviceReceiver();
|
devices = new DeviceReceiver();
|
||||||
lights = new DirectionalLightReceiver();
|
lights = new DirectionalLightReceiver();
|
||||||
|
cam = new CameraReceiver(node.GetViewport().GetCamera3D());
|
||||||
}
|
}
|
||||||
private void ProcessMessage(OscMessage m)
|
private void ProcessMessage(OscMessage m)
|
||||||
{
|
{
|
||||||
|
|
|
@ -29,8 +29,10 @@ namespace godotVmcSharp
|
||||||
private CameraReceiver cam;
|
private CameraReceiver cam;
|
||||||
private DeviceReceiver devices;
|
private DeviceReceiver devices;
|
||||||
private DirectionalLightReceiver lights;
|
private DirectionalLightReceiver lights;
|
||||||
public Performer(IPAddress host, int port)
|
private Node3D node;
|
||||||
|
public Performer(IPAddress host, int port, Node3D node)
|
||||||
{
|
{
|
||||||
|
this.node = node;
|
||||||
receiver = new OscReceiver(port);
|
receiver = new OscReceiver(port);
|
||||||
sender = new OscSender(host, port);
|
sender = new OscSender(host, port);
|
||||||
receiver.MessageReceived += (sender, e) =>
|
receiver.MessageReceived += (sender, e) =>
|
||||||
|
@ -44,6 +46,7 @@ namespace godotVmcSharp
|
||||||
};
|
};
|
||||||
devices = new DeviceReceiver();
|
devices = new DeviceReceiver();
|
||||||
lights = new DirectionalLightReceiver();
|
lights = new DirectionalLightReceiver();
|
||||||
|
cam = new CameraReceiver(node.GetViewport().GetCamera3D());
|
||||||
}
|
}
|
||||||
private void ProcessMessage(OscMessage m)
|
private void ProcessMessage(OscMessage m)
|
||||||
{
|
{
|
||||||
|
@ -96,4 +99,4 @@ namespace godotVmcSharp
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user