Nazara Engine  0.4
A fast, complete, cross-platform API designed for game development
ParticleGroupComponent.hpp
1 // Copyright (C) 2017 Jérôme Leclercq
2 // This file is part of the "Nazara Development Kit"
3 // For conditions of distribution and use, see copyright notice in Prerequesites.hpp
4 
5 #pragma once
6 
7 #ifndef NDK_SERVER
8 #ifndef NDK_COMPONENTS_PARTICLEGROUPCOMPONENT_HPP
9 #define NDK_COMPONENTS_PARTICLEGROUPCOMPONENT_HPP
10 
11 #include <Nazara/Graphics/ParticleGroup.hpp>
12 #include <NDK/Component.hpp>
13 
14 namespace Ndk
15 {
16  class ParticleGroupComponent;
17 
18  using ParticleGroupComponentHandle = Nz::ObjectHandle<ParticleGroupComponent>;
19 
20  class NDK_API ParticleGroupComponent : public Component<ParticleGroupComponent>, public Nz::ParticleGroup, public Nz::HandledObject<ParticleGroupComponent>
21  {
22  public:
23  inline ParticleGroupComponent(unsigned int maxParticleCount, Nz::ParticleLayout layout);
24  inline ParticleGroupComponent(unsigned int maxParticleCount, Nz::ParticleDeclarationConstRef declaration);
26  ~ParticleGroupComponent() = default;
27 
28  void AddEmitter(Entity* emitter);
29  using ParticleGroup::AddEmitter;
30 
31  void RemoveEmitter(Entity* emitter);
32  using ParticleGroup::RemoveEmitter;
33 
34  static ComponentIndex componentIndex;
35  };
36 }
37 
38 #include <NDK/Components/ParticleGroupComponent.inl>
39 
40 #endif // NDK_COMPONENTS_PARTICLEGROUPCOMPONENT_HPP
41 #endif // NDK_SERVER
TODO: For now is unable to display different color in the history, it needs a RichTextDrawer to do so...
Definition: Algorithm.hpp:12
NDK class that represents an entity in a world.
Definition: Entity.hpp:28
NDK class that represents the component for a group of particles.
Definition: ParticleGroupComponent.hpp:20