Garage working, ready for vehicle swap implementation

This commit is contained in:
ViktorLjung
2014-06-01 03:07:47 +02:00
parent a142d368a7
commit d64be64ba4
18 changed files with 711 additions and 276 deletions
+35
View File
@@ -0,0 +1,35 @@
#ifndef Components_Garage_h__
#define Components_Garage_h__
#include "Component.h"
namespace Components
{
struct Garage : Component
{
Garage()
: Open(false)
, Elevator(0)
, DoorLeft(0)
, DoorRight(0)
, Light1(0)
, Light2(0)
, Light3(0)
, Light4(0)
{ }
EntityID Elevator;
EntityID DoorLeft;
EntityID DoorRight;
EntityID Light1;
EntityID Light2;
EntityID Light3;
EntityID Light4;
bool Open;
virtual Garage* Clone() const override { return new Garage(*this); }
};
}
#endif // Components_TankShell_h__
+20
View File
@@ -0,0 +1,20 @@
#ifndef Components_Move_h__
#define Components_Move_h__
#include "Component.h"
namespace Components
{
struct Move : Component
{
float Speed;
glm::vec3 StartPosition;
glm::vec3 GoalPosition;
virtual Move* Clone() const override { return new Move(*this); }
};
}
#endif // Components_Move_h__
+19
View File
@@ -0,0 +1,19 @@
#ifndef Components_Rotate_h__
#define Components_Rotate_h__
#include "Component.h"
namespace Components
{
struct Rotate : Component
{
float Time;
glm::quat StartRotation;
glm::quat GoalRotation;
virtual Rotate* Clone() const override { return new Rotate(*this); }
};
}
#endif // Components_Rotate_h__
+7 -3
View File
@@ -8,10 +8,14 @@ namespace Components
struct TriggerMove : Component
{
TriggerMove()
: Queue(false)
, Swap(true)
{ }
EntityID Entity;
float Speed;
glm::vec3 StartPosition;
glm::vec3 GoalPosition;
bool Queue;
bool Swap;
virtual TriggerMove* Clone() const override { return new TriggerMove(*this); }
};
+24
View File
@@ -0,0 +1,24 @@
#ifndef TriggerRotate_h__
#define TriggerRotate_h__
#include "Component.h"
namespace Components
{
struct TriggerRotate : Component
{
TriggerRotate()
: Queue(false)
, Swap(true)
{ }
EntityID Entity;
bool Queue;
bool Swap;
virtual TriggerRotate* Clone() const override { return new TriggerRotate(*this); }
};
}
#endif // TriggerRotate_h__