Walls are now destroyable!

This commit is contained in:
Tleety
2014-06-02 18:21:39 +02:00
parent 0e2934647c
commit 00268f027a
13 changed files with 606 additions and 63 deletions
+8 -2
View File
@@ -8,13 +8,19 @@ namespace Components
struct Physics : Component
{
enum class MotionTypeEnum
{
Dynamic,
Fixed,
Keyframed
};
Physics()
: Mass(1.f), Static(false), Phantom(false), CalculateCenterOfMass(true), CenterOfMass(glm::vec3(0)), InitialLinearVelocity(glm::vec3(0)), InitialAngularVelocity(glm::vec3(0)),
: Mass(1.f), MotionType(MotionTypeEnum::Fixed), Phantom(false), CalculateCenterOfMass(true), CenterOfMass(glm::vec3(0)), InitialLinearVelocity(glm::vec3(0)), InitialAngularVelocity(glm::vec3(0)),
LinearDamping(0.f), AngularDamping(0.05f), GravityFactor(1.f), Friction(0.5f), Restitution(0.4f), MaxLinearVelocity(200.f), MaxAngularVelocity(200.f),
CollisionLayer(0), CollisionSystemGroup(0), CollisionSubSystemId(0), CollisionSubSystemDontCollideWith(0), CollisionEvent(false){}
float Mass;
bool Static;
MotionTypeEnum MotionType;
bool Phantom;
bool CalculateCenterOfMass;
+20
View File
@@ -0,0 +1,20 @@
#ifndef Components_Wall_h__
#define Components_Wall_h__
#include "Component.h"
#include <string>
#include <vector>
namespace Components
{
struct Wall : Component
{
std::vector<EntityID> Walldebris;
virtual Wall* Clone() const override { return new Wall(*this); }
};
}
#endif // Components_TankShell_h__