Vulkan Schnee 0.0.1 (22840dc8)
High-performance rendering engine
Loading...
Searching...
No Matches
WindTrailComponent.h
1#pragma once
2
3#include "Engine/Component/LogicComponent.h"
4#include <memory>
5
6namespace Engine::Entities
7{
8 class SceneNode;
9 class Scene;
10} // namespace Engine::Entities
11
12namespace Engine::Components {
13
17 class WindTrail : public Logic
18 {
19 public:
20 static constexpr bool IsUnique = true;
21 static constexpr const char * ComponentName = "WindTrail";
22
27 explicit WindTrail( Entities::Scene * owningScene );
28
32 ~WindTrail() override = default;
33
34 void beginPlay() override;
35 void endPlay() override;
36
41 [[nodiscard]] std::shared_ptr<Entities::SceneNode> getEmitterNode() const
42 {
43 return emitterNode_;
44 }
45
46 private:
47 std::shared_ptr<Entities::SceneNode> emitterNode_;
48 };
49
50} // namespace EngineCore
Logic(Entities::Scene *owningScene)
Constructs a logic component owned by a scene.
~WindTrail() override=default
Destroys the wind trail component.
void beginPlay() override
Called when the component is added to the scene or the game starts.
static constexpr bool IsUnique
This component type is unique per actor.
std::shared_ptr< Entities::SceneNode > emitterNode_
std::shared_ptr< Entities::SceneNode > getEmitterNode() const
Gets the scene node used as the trail emitter.
void endPlay() override
Called when the component is removed or the game ends.
static constexpr const char * ComponentName
Component registry name.
WindTrail(Entities::Scene *owningScene)
Constructs a wind trail component for a scene.
Represents a node in the scene graph, containing information about its position, rotation,...
Definition SceneGraph.h:27
Owns scene entities, actor lifetime, and the scene graph root.
Definition Scene.h:84