(NDK) Added Velocity component/system

Former-commit-id: 427b7175fbf9723fcd1d54fc279b8b70167745d4
This commit is contained in:
Lynix
2015-04-12 23:19:53 +02:00
parent 2ab0defa48
commit ead468525e
8 changed files with 128 additions and 0 deletions

View File

@@ -0,0 +1,33 @@
// Copyright (C) 2015 Jérôme Leclercq
// This file is part of the "Nazara Development Kit"
// For conditions of distribution and use, see copyright notice in Prerequesites.hpp
#pragma once
#ifndef NDK_COMPONENTS_VELOCITYCOMPONENT_HPP
#define NDK_COMPONENTS_VELOCITYCOMPONENT_HPP
#include <Nazara/Math/Vector3.hpp>
#include <NDK/Component.hpp>
namespace Ndk
{
class Entity;
class NDK_API VelocityComponent : public Component<VelocityComponent>
{
public:
VelocityComponent(const NzVector3f& velocity = NzVector3f::Zero());
~VelocityComponent() = default;
NzVector3f linearVelocity;
VelocityComponent& operator=(const NzVector3f& vel);
static ComponentIndex componentIndex;
};
}
#include <NDK/Components/VelocityComponent.inl>
#endif // NDK_COMPONENTS_VELOCITYCOMPONENT_HPP