create new constructor for VmcExtKey

This commit is contained in:
Cassandra de la Cruz-Munoz 2023-08-16 19:43:21 -04:00
parent 023db85b1b
commit 30a960ef0b

View File

@ -52,5 +52,17 @@ namespace godotVmcSharp
name = (string)m.Data[1].Value;
keycode = (int)m.Data[2].Value;
}
public VmcExtKey(int _active, string _name, int _keycode) : base(new godotOscSharp.Address("/VMC/Ext/Key"))
{
if (_active < 0 || _active > 1)
{
GD.Print($"Invalid value for \"active\" 'i' argument of {addr}. Expected 0 or 1, received {_active}");
return;
}
active = _active;
name = _name;
keycode = _keycode;
}
}
}