Cogs.Core
FollowComponent.h
1#include "Components/Core/DynamicComponent.h"
2
3#include <glm/vec3.hpp>
4
5namespace Cogs
6{
7 namespace Core
8 {
9 class Context;
10
12 {
13 public:
14 FollowComponent() : offset(0, 0, 0) {}
15
16 void initialize(Context * context);
17 void update();
18 void cleanup(Context * context);
19
20 std::shared_ptr<ComponentModel::Entity> target;
21
22 glm::vec3 offset;
23
24 static void registerType();
25 };
26 }
27}
28
29template<> inline Cogs::StringView getName<Cogs::Core::FollowComponent>() { return "FollowComponent"; }
A Context instance contains all the services, systems and runtime components needed to use Cogs.
Definition: Context.h:83
Base class for components implementing dynamic behavior.
Provides a weakly referenced view over the contents of a string.
Definition: StringView.h:24
Contains all Cogs related functionality.
Definition: FieldSetter.h:23