载入中...
搜索中...
未找到
ActionPrefabBlock.h
浏览该文件的文档.
1#pragma once
2#include "common/Export.h"
3
4
12#include "common/Time.h"
13
14#include <cstdint>
15#include <string>
16#include <string_view>
17
18namespace eve::action {
19
21enum class PrefabSpawnLifecycle : std::uint8_t {
28};
29
37 std::string uri;
38 PrefabSpawnLifecycle lifecycle = PrefabSpawnLifecycle::RecycleOnBlockExit;
39 Duration customDuration = Duration::zero();
41
43 auto operator<=>(const ActionPrefabSpawnBinding&) const = default;
44
52 [[nodiscard]] static Result<ActionPrefabSpawnBinding> fromPayload(const Value::Object& payload);
53};
54
56[[nodiscard]] std::string_view prefabSpawnLifecycleName(PrefabSpawnLifecycle lifecycle) noexcept;
57
58} // namespace eve::action
Typed spatial payload shared by presentation action blocks.
Value::Object payload
#define EVENGINE_API_PLATFORM
Definition Export.h:107
Common time values and an injectable deterministic simulation clock.
Signed, fixed-resolution simulation duration in nanoseconds.
Definition Time.h:43
Move-only operation result carrying either a value or Status.
Definition Result.h:176
std::map< std::string, Value > Object
Definition Value.h:34
std::string_view prefabSpawnLifecycleName(PrefabSpawnLifecycle lifecycle) noexcept
Return the stable serialized spelling for a prefab lifecycle.
PrefabSpawnLifecycle
Authority responsible for ending a spawned prefab instance.
@ CustomDuration
The action block recycles the instance after customDuration.
@ RecycleOnBlockExit
The action block recycles the instance on Exit or interruption.
Fully validated, owning settings for one prefab-spawn state block.
auto operator<=>(const ActionPrefabSpawnBinding &) const =default
Operator <=>.
Validated spatial settings decoded from a notify payload.