From c1953881a0412466b69c4dc7f454e6c439302ac9 Mon Sep 17 00:00:00 2001 From: Cassandra de la Cruz-Munoz Date: Wed, 16 Aug 2023 19:29:01 -0400 Subject: [PATCH] fix compliation error in constructor, add ToMessage --- VmcMessages/VmcExtCon.cs | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/VmcMessages/VmcExtCon.cs b/VmcMessages/VmcExtCon.cs index de27305..e29a175 100644 --- a/VmcMessages/VmcExtCon.cs +++ b/VmcMessages/VmcExtCon.cs @@ -18,6 +18,7 @@ using Godot; using godotOscSharp; +using System.Collections.Generic; namespace godotVmcSharp { @@ -96,7 +97,21 @@ namespace godotVmcSharp isLeft = _isLeft; isTouch = _isTouch; isAxis = _isAxis; - axis = _axis + axis = _axis; + } + + public godotOscSharp.OscMessage ToMessage() + { + return new godotOscSharp.OscMessage(addr, new List{ + new godotOscSharp.OscArgument(active, 'i'), + new godotOscSharp.OscArgument(name, 's'), + new godotOscSharp.OscArgument(isLeft, 'i'), + new godotOscSharp.OscArgument(isTouch, 'i'), + new godotOscSharp.OscArgument(isAxis, 'i'), + new godotOscSharp.OscArgument(axis.X, 'i'), + new godotOscSharp.OscArgument(axis.Y, 'i'), + new godotOscSharp.OscArgument(axis.Z, 'i'), + }); } } } \ No newline at end of file