Merge branch 'master' into particles
Conflicts: src/GameWorld.cpp vs11/Returngeance/Returngeance.vcxproj vs11/Returngeance/Returngeance.vcxproj.filters
This commit is contained in:
@@ -15,6 +15,9 @@ namespace Components
|
||||
EntityID ShotTemplate;
|
||||
float ShotSpeed;
|
||||
|
||||
float LowerRotationLimit;
|
||||
float UpperRotationLimit;
|
||||
|
||||
virtual BarrelSteering* Clone() const override { return new BarrelSteering(*this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
#ifndef Components_Follow_h__
|
||||
#define Components_Follow_h__
|
||||
|
||||
#include "Component.h"
|
||||
#include "Entity.h"
|
||||
|
||||
namespace Components
|
||||
{
|
||||
|
||||
struct Follow : Component
|
||||
{
|
||||
EntityID Entity;
|
||||
glm::vec3 FollowAxis;
|
||||
float Distance;
|
||||
|
||||
virtual Follow* Clone() const override { return new Follow(*this); }
|
||||
};
|
||||
|
||||
}
|
||||
#endif // !Components_Follow_h__
|
||||
@@ -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,19 @@
|
||||
#ifndef Components_Listener_h__
|
||||
#define Components_Listener_h__
|
||||
|
||||
#include <string>
|
||||
#include <glm/common.hpp>
|
||||
#include "Component.h"
|
||||
|
||||
namespace Components
|
||||
{
|
||||
|
||||
struct Listener : Component
|
||||
{
|
||||
Listener() {}
|
||||
|
||||
virtual Listener* Clone() const override { return new Listener(*this); }
|
||||
};
|
||||
|
||||
}
|
||||
#endif // !Components_Listener_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__
|
||||
@@ -8,6 +8,14 @@ namespace Components
|
||||
|
||||
struct Physics : Component
|
||||
{
|
||||
enum class CollisionLayer
|
||||
{
|
||||
STATIC = 1,
|
||||
VEHICLE1_ = 2,
|
||||
VEHICLE2 = 3,
|
||||
EXPLOSION = 4,
|
||||
};
|
||||
|
||||
Physics()
|
||||
: Mass(1.f), Static(false), 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),
|
||||
|
||||
@@ -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,16 +7,23 @@
|
||||
|
||||
namespace Components
|
||||
{
|
||||
|
||||
|
||||
struct SoundEmitter : Component
|
||||
{
|
||||
SoundEmitter() : Gain(1.f), MaxDistance(1.f), ReferenceDistance(1.f), Pitch(1.f), Loop(false) {}
|
||||
enum class SoundType
|
||||
{
|
||||
SOUND_3D,
|
||||
SOUND_2D
|
||||
};
|
||||
|
||||
SoundEmitter() : Gain(1.f), MaxDistance(1.f), MinDistance(1.f), Pitch(1.f), Loop(false) {}
|
||||
float Gain;
|
||||
float MaxDistance;
|
||||
float ReferenceDistance;
|
||||
float MinDistance;
|
||||
float Pitch;
|
||||
bool Loop;
|
||||
std::string Path;
|
||||
SoundType type;
|
||||
|
||||
virtual SoundEmitter* Clone() const override { return new SoundEmitter(*this); }
|
||||
};
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
#ifndef Components_VehicleSpawn_h__
|
||||
#define Components_VehicleSpawn_h__
|
||||
|
||||
#include "Component.h"
|
||||
|
||||
namespace Components
|
||||
{
|
||||
|
||||
struct SpawnPoint : Component
|
||||
{
|
||||
virtual SpawnPoint* Clone() const override { return new SpawnPoint(*this); }
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif // Components_VehicleSpawn_h__
|
||||
@@ -0,0 +1,24 @@
|
||||
#ifndef TriggerMove_h__
|
||||
#define TriggerMove_h__
|
||||
|
||||
#include "Component.h"
|
||||
|
||||
namespace Components
|
||||
{
|
||||
|
||||
struct TriggerMove : Component
|
||||
{
|
||||
TriggerMove()
|
||||
: Queue(false)
|
||||
, Swap(true)
|
||||
{ }
|
||||
|
||||
EntityID Entity;
|
||||
bool Queue;
|
||||
bool Swap;
|
||||
virtual TriggerMove* Clone() const override { return new TriggerMove(*this); }
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif // TriggerMove_h__
|
||||
@@ -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__
|
||||
@@ -10,9 +10,10 @@ namespace Components
|
||||
struct Vehicle : Component
|
||||
{
|
||||
Vehicle()
|
||||
: MaxTorque(1000.0f), MinRPM(1000.0f), OptimalRPM(3000.0f), MaxRPM(4000.0f), MaxSteeringAngle(35), TopSpeed(130.0f),
|
||||
MaxSpeedFullSteeringAngle(40.0f), SpringDamping(1.f){ }
|
||||
|
||||
: MaxTorque(1000.0f), MinRPM(0.0f), OptimalRPM(2000.0f), MaxRPM(3000.0f), MaxSteeringAngle(35), TopSpeed(70.0f),
|
||||
MaxSpeedFullSteeringAngle(40.0f), SpringDamping(1.f), UpshiftRPM(2500.0f), DownshiftRPM(500.0f),
|
||||
gearsRatio0(4.5f), gearsRatio1(2.5f), gearsRatio2(1.0f), gearsRatio3(0.5f){ }
|
||||
//gearsRatio0(3.0f), gearsRatio1(2.25f), gearsRatio2(1.5f), gearsRatio3(1.0f)
|
||||
float MaxTorque;
|
||||
float MinRPM;
|
||||
float OptimalRPM;
|
||||
@@ -23,7 +24,13 @@ struct Vehicle : Component
|
||||
float TopSpeed;
|
||||
float MaxSpeedFullSteeringAngle;
|
||||
float SpringDamping;
|
||||
|
||||
float DownshiftRPM;
|
||||
float UpshiftRPM;
|
||||
float gearsRatio0;
|
||||
float gearsRatio1;
|
||||
float gearsRatio2;
|
||||
float gearsRatio3;
|
||||
|
||||
Vehicle* Clone() const override { return new Vehicle(*this); }
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user