载入中...
搜索中...
未找到
ActionGameEventSink.h
浏览该文件的文档.
1#pragma once
2#include "common/Export.h"
3
4
8#include "common/SubjectRef.h"
10
11#include <functional>
12#include <optional>
13
15
21using ActionSubjectResolver = std::function<Result<SubjectRef>(ecs::EntityHandle)>;
22
30public:
39 ~ActionGameEventSink() override;
40
42 void setEnabled(bool enabled);
44 [[nodiscard]] bool enabled() const;
47 [[nodiscard]] Result<void> emit(const ActionGameplayEventBinding& binding,
48 const ActionNotifyContext& context) override;
50 [[nodiscard]] std::optional<eve::game_event::EventSequence> lastSequence() const noexcept;
51
52private:
53 eve::game_event::GameEventLog* log_ = nullptr;
54 ActionSubjectResolver resolver_;
55 std::optional<eve::game_event::EventSequence> lastSequence_;
56};
57
58} // namespace eve::action::game_event_adapter
Typed instantaneous gameplay-event action contract.
#define EVENGINE_API_BACKENDS
Definition Export.h:108
eve::action::ActionVfxBinding binding
Stable reference to a runtime gameplay subject.
const VegetationPresetContext & context
Move-only operation result carrying either a value or Status.
Definition Result.h:155
Optional target-domain adapter for instantaneous timeline gameplay events.
Explicit bridge from gameplay:event blocks to one persistent GameEventLog.
Deterministic in-memory stream of topic-neutral event envelopes.
Definition GameEvent.h:261
std::function< Result< SubjectRef >(ecs::EntityHandle)> ActionSubjectResolver
Resolves a stable gameplay subject for a generation-qualified ECS handle.
bool enabled
Owning validated event request authored on an action timeline.
Context linking a routed event to its action execution.