载入中...
搜索中...
未找到
ActionWindowState.h
浏览该文件的文档.
1#pragma once
2#include "common/Export.h"
3
4
8#include "common/SubjectRef.h"
9
10#include <functional>
11#include <map>
12#include <string>
13#include <vector>
14
15namespace eve::combat {
16
17class MeleeHitRuntime;
18
24using ActionWindowSubjectResolver = std::function<Result<SubjectRef>(ecs::EntityHandle)>;
25
34public:
38 ~CombatActionWindowState() override;
39
41 void setEnabled(bool enabled);
46 void setMeleeHitRuntime(MeleeHitRuntime& melee) noexcept;
48 void clearMeleeHitRuntime() noexcept;
50 [[nodiscard]] bool enabled() const;
53 [[nodiscard]] bool supports(action::ActionStateWindowKind kind) const noexcept override;
56 [[nodiscard]] Result<void> enter(const action::ActionStateWindowBinding& binding,
57 const action::ActionTimelineEvent& event,
58 const action::ActionNotifyContext& context) override;
62 const action::ActionTimelineEvent& event,
63 const action::ActionNotifyContext& context) override;
64
66 [[nodiscard]] bool isInvulnerable(SubjectRef subject) const noexcept;
68 [[nodiscard]] std::vector<std::string> activeHitboxes(SubjectRef subject) const;
70 [[nodiscard]] std::size_t activeCount() const noexcept { return active_.size(); }
71
72private:
73 using ActiveKey = std::pair<action::ActionExecutionId, std::string>;
74 struct ActiveWindow {
77 };
78
79 ActionWindowSubjectResolver resolver_;
80 std::map<ActiveKey, ActiveWindow> active_;
81 MeleeHitRuntime* melee_ = nullptr;
82};
83
84} // namespace eve::combat
Typed combat/input/collision action-state window contracts.
int subject
Definition AnimSmr.cpp:163
#define EVENGINE_API_BACKENDS
Definition Export.h:108
TokenKind kind
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
Strong, domain-neutral reference to a runtime subject.
Definition SubjectRef.h:26
Optional target-domain adapter for paired action state windows.
Authoritative combat projection of active Montage hitbox and invulnerability windows.
std::size_t activeCount() const noexcept
Return the total number of retained active window keys.
Owner-thread authority for hurtboxes, hitbox catalogs and sweep hits.
Definition MeleeHit.h:132
ActionStateWindowKind
Stable semantic kind for one built-in state window.
std::function< Result< SubjectRef >(ecs::EntityHandle)> ActionWindowSubjectResolver
Resolves an owning stable subject from a generation-qualified ECS handle.
bool enabled
Context linking a routed event to its action execution.
Owning validated state-window request authored on an action timeline.
Owning event projection returned by the runtime sampler.