Skip to content

Commit c75aa5c

Browse files
committed
feat: add execution options wrappers to runner
1 parent 0af445d commit c75aa5c

File tree

2 files changed

+21
-3
lines changed

2 files changed

+21
-3
lines changed

Source/Ecsact/Public/EcsactRunner.h

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
#include "CoreMinimal.h"
44
#include "Tickable.h"
5+
#include "EcsactUnrealExecutionOptions.h"
56
#include "ecsact/runtime/common.h"
67
#include "EcsactRunner.generated.h"
78

@@ -21,4 +22,24 @@ class UEcsactRunner : public UObject, public FTickableGameObject {
2122
auto Tick(float DeltaTime) -> void override;
2223
auto GetStatId() const -> TStatId override;
2324
auto IsTickable() const -> bool override;
25+
26+
template<typename A>
27+
auto PushAction(const A& Action) -> void {
28+
return ExecutionOptions->PushAction<A>(Action);
29+
}
30+
31+
template<typename C>
32+
auto AddComponent(ecsact_entity_id Entity, const C& Component) -> void {
33+
return ExecutionOptions->AddComponent<C>(Entity, Component);
34+
}
35+
36+
template<typename C>
37+
auto UpdateComponent(ecsact_entity_id Entity, const C& Component) -> void {
38+
return ExecutionOptions->UpdateComponent<C>(Entity, Component);
39+
}
40+
41+
template<typename C>
42+
auto RemoveComponent(ecsact_entity_id Entity) -> void {
43+
return ExecutionOptions->RemoveComponent<C>(Entity);
44+
}
2445
};

Source/Ecsact/Public/EcsactUnrealExecutionOptions.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,4 @@ class UEcsactUnrealExecutionOptions : public UObject {
7676
ExecOpts.remove_components_length = RemoveComponentList.Num();
7777
ExecOpts.remove_components = RemoveComponentList.GetData();
7878
}
79-
80-
inline auto DestroyEntity(ecsact_entity_id Entity) -> void {
81-
}
8279
};

0 commit comments

Comments
 (0)