Temporary commit - work in progress
This commit is contained in:
parent
1fa6d62f17
commit
65fee858dd
7 changed files with 54 additions and 28 deletions
|
@ -65,8 +65,8 @@ int main() {
|
|||
|
||||
wren::DefConfiguration config;
|
||||
wren::VM vm(&config, &custom_data);
|
||||
vm.callback_manager().add_callback(true, "main", "Game", "user_input()", &user_input)
|
||||
.add_callback(true, "main", "Game", "random()", &random_num);
|
||||
vm.callback_manager().add_callback(true, "main", "Game", "user_input()", [](){return &user_input;})
|
||||
.add_callback(true, "main", "Game", "random()", [](){return &random_num;});
|
||||
|
||||
interpret(vm, "main", load_file("main.wren"));
|
||||
wren::call<void>(vm, wren::MN<"main", "the_game">, "play_game");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue