feat: add runtime play tick and play-mode scene editing semantics

This commit is contained in:
2026-04-02 19:37:35 +08:00
parent e30f5d5ffa
commit fb15d60be9
28 changed files with 2016 additions and 45 deletions

View File

@@ -0,0 +1,35 @@
#pragma once
#include "EditorRuntimeMode.h"
#include "SceneSnapshot.h"
#include <XCEngine/Scene/RuntimeLoop.h>
#include <cstdint>
namespace XCEngine {
namespace Editor {
class IEditorContext;
class PlaySessionController {
public:
void Attach(IEditorContext& context);
void Detach(IEditorContext& context);
void Update(IEditorContext& context, float deltaTime);
bool StartPlay(IEditorContext& context);
bool StopPlay(IEditorContext& context);
bool PausePlay(IEditorContext& context);
private:
uint64_t m_playStartRequestedHandlerId = 0;
uint64_t m_playStopRequestedHandlerId = 0;
uint64_t m_playPauseRequestedHandlerId = 0;
SceneSnapshot m_editorSnapshot = {};
XCEngine::Components::RuntimeLoop m_runtimeLoop;
};
} // namespace Editor
} // namespace XCEngine