Checkpoint 4: harden native paths, authoring workflows and Player lifecycle
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
#include "Gameplay.hpp"
|
||||
#include <stdexcept>
|
||||
|
||||
namespace faset::gameplay {
|
||||
void registerGameplay(runtime::Runtime& runtime) {
|
||||
runtime::Behavior behavior;
|
||||
behavior.onStart = [](auto&, auto, double) { throw std::runtime_error("TEST_ON_START"); };
|
||||
behavior.update = [](auto&, auto, double) { throw std::runtime_error("TEST_UPDATE"); };
|
||||
behavior.onDestroy = [](auto&, auto, double) { throw std::runtime_error("TEST_ON_DESTROY"); };
|
||||
runtime.registerBehavior("test.diagnostics", std::move(behavior));
|
||||
}
|
||||
nlohmann::json schema() {
|
||||
return nlohmann::json::array(
|
||||
{{{"id", "test.diagnostics"}, {"version", 2}, {"fields", nlohmann::json::object()}}});
|
||||
}
|
||||
} // namespace faset::gameplay
|
||||
@@ -0,0 +1,7 @@
|
||||
#pragma once
|
||||
#include <faset/runtime/Runtime.hpp>
|
||||
|
||||
namespace faset::gameplay {
|
||||
void registerGameplay(runtime::Runtime& runtime);
|
||||
nlohmann::json schema();
|
||||
} // namespace faset::gameplay
|
||||
Reference in New Issue
Block a user