add ToMessage() to VmcExtRcv
This commit is contained in:
parent
4267927352
commit
c1825dad14
|
@ -18,6 +18,7 @@
|
|||
|
||||
using Godot;
|
||||
using godotOscSharp;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace godotVmcSharp
|
||||
{
|
||||
|
@ -100,5 +101,21 @@ namespace godotVmcSharp
|
|||
port = _port;
|
||||
ipAddress = _ipAddress;
|
||||
}
|
||||
|
||||
public godotOscSharp.OscMessage ToMessage()
|
||||
{
|
||||
if (ipAddress == null)
|
||||
{
|
||||
return new godotOscSharp.OscMessage(addr, new List<godotOscSharp.OscArgument>{
|
||||
new godotOscSharp.OscArgument(enable, 'i'),
|
||||
new godotOscSharp.OscArgument(port, 'i'),
|
||||
});
|
||||
}
|
||||
return new godotOscSharp.OscMessage(addr, new List<godotOscSharp.OscArgument>{
|
||||
new godotOscSharp.OscArgument(enable, 'i'),
|
||||
new godotOscSharp.OscArgument(port, 'i'),
|
||||
new godotOscSharp.OscArgument(ipAddress, 's'),
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user