add ToMessage() to VmcExtVrm

This commit is contained in:
Cassandra de la Cruz-Munoz 2023-08-17 10:33:10 -04:00
parent 97d467a62a
commit f91613a745

View File

@ -18,6 +18,7 @@
using Godot; using Godot;
using godotOscSharp; using godotOscSharp;
using System.Collections.Generic;
namespace godotVmcSharp namespace godotVmcSharp
{ {
@ -83,5 +84,21 @@ namespace godotVmcSharp
title = _title; title = _title;
hash = _hash; hash = _hash;
} }
public godotOscSharp.OscMessage ToMessage()
{
if (hash == null)
{
return new godotOscSharp.OscMessage(addr, new List<godotOscSharp.OscArgument>{
new godotOscSharp.OscArgument(path, 's'),
new godotOscSharp.OscArgument(title, 's')
});
}
return new godotOscSharp.OscMessage(addr, new List<godotOscSharp.OscArgument>{
new godotOscSharp.OscArgument(path, 's'),
new godotOscSharp.OscArgument(title, 's'),
new godotOscSharp.OscArgument(hash, 's')
});
}
} }
} }