2026-03-26 20:45:41 +08:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include <XCEngine/Scripting/IScriptRuntime.h>
|
|
|
|
|
|
|
|
|
|
namespace XCEngine {
|
|
|
|
|
namespace Scripting {
|
|
|
|
|
|
|
|
|
|
class NullScriptRuntime : public IScriptRuntime {
|
|
|
|
|
public:
|
|
|
|
|
void OnRuntimeStart(Components::Scene* scene) override;
|
|
|
|
|
void OnRuntimeStop(Components::Scene* scene) override;
|
2026-03-28 15:09:42 +08:00
|
|
|
bool TryGetClassFieldMetadata(
|
|
|
|
|
const std::string& assemblyName,
|
|
|
|
|
const std::string& namespaceName,
|
|
|
|
|
const std::string& className,
|
|
|
|
|
std::vector<ScriptFieldMetadata>& outFields) const override;
|
|
|
|
|
bool TryGetClassFieldDefaultValues(
|
|
|
|
|
const std::string& assemblyName,
|
|
|
|
|
const std::string& namespaceName,
|
|
|
|
|
const std::string& className,
|
|
|
|
|
std::vector<ScriptFieldDefaultValue>& outFields) const override;
|
|
|
|
|
bool TrySetManagedFieldValue(
|
|
|
|
|
const ScriptRuntimeContext& context,
|
|
|
|
|
const std::string& fieldName,
|
|
|
|
|
const ScriptFieldValue& value) override;
|
|
|
|
|
bool TryGetManagedFieldValue(
|
|
|
|
|
const ScriptRuntimeContext& context,
|
|
|
|
|
const std::string& fieldName,
|
|
|
|
|
ScriptFieldValue& outValue) const override;
|
|
|
|
|
void SyncManagedFieldsToStorage(const ScriptRuntimeContext& context) override;
|
2026-03-26 20:45:41 +08:00
|
|
|
|
|
|
|
|
bool CreateScriptInstance(const ScriptRuntimeContext& context) override;
|
|
|
|
|
void DestroyScriptInstance(const ScriptRuntimeContext& context) override;
|
|
|
|
|
|
|
|
|
|
void InvokeMethod(
|
|
|
|
|
const ScriptRuntimeContext& context,
|
|
|
|
|
ScriptLifecycleMethod method,
|
|
|
|
|
float deltaTime) override;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
} // namespace Scripting
|
|
|
|
|
} // namespace XCEngine
|