载入中...
搜索中...
未找到
ActionPrefabBlock.h
浏览该文件的文档.
1#pragma once
2#include "common/Export.h"
3
4
8#include "common/Time.h"
9
10#include <cstdint>
11#include <string>
12#include <string_view>
13
14namespace eve::action {
15
17enum class PrefabSpawnLifecycle : std::uint8_t {
24};
25
33 std::string uri;
34 PrefabSpawnLifecycle lifecycle = PrefabSpawnLifecycle::RecycleOnBlockExit;
35 Duration customDuration = Duration::zero();
37
39 auto operator<=>(const ActionPrefabSpawnBinding&) const = default;
40
48 [[nodiscard]] static Result<ActionPrefabSpawnBinding> fromPayload(const Value::Object& payload);
49};
50
52[[nodiscard]] std::string_view prefabSpawnLifecycleName(PrefabSpawnLifecycle lifecycle) noexcept;
53
54} // 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:155
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.