Implement initial engio experiments
This commit is contained in:
@@ -134,9 +134,19 @@ void AIntegrationGameModeBase::UpdateTangibles() {
|
||||
|
||||
void AIntegrationGameModeBase::ExecuteDebuggingCommand(const FString &fs) {
|
||||
if (fs == "\\invokeplayer") {
|
||||
// FlxLockedWrapper w(LockableWrapper);
|
||||
// int64 player = w.GetActor();
|
||||
// w->play_invoke_player(w.Get(), player, datapk);
|
||||
DPrint(TEXT("Trying to invoke 'myfunction' in lua"));
|
||||
FlxLockedWrapper w(LockableWrapper);
|
||||
FlxStreamBuffer sb;
|
||||
sb.write_string("myfunction");
|
||||
sb.write_simple_dynamic_tag(SimpleDynamicTag::NUMBER);
|
||||
sb.write_double(3.0);
|
||||
sb.write_simple_dynamic_tag(SimpleDynamicTag::STRING);
|
||||
sb.write_string("Howdy");
|
||||
sb.write_simple_dynamic_tag(SimpleDynamicTag::BOOLEAN);
|
||||
sb.write_bool(true);
|
||||
std::string_view datapk = sb.view();
|
||||
int64 player = w.GetActor();
|
||||
w->play_invoke_engio(w.Get(), player, datapk.size(), datapk.data());
|
||||
} else {
|
||||
ConsoleOutput.AppendLine(TEXT("Unknown Command"));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user