Garage working, ready for vehicle swap implementation
This commit is contained in:
@@ -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__
|
||||
@@ -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__
|
||||
@@ -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__
|
||||
@@ -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); }
|
||||
};
|
||||
|
||||
|
||||
@@ -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__
|
||||
Reference in New Issue
Block a user