Added two new particle sprites.
This commit is contained in:
@@ -188,6 +188,7 @@ public:
|
||||
}
|
||||
|
||||
//Background
|
||||
|
||||
{
|
||||
auto background = m_World->CreateEntity();
|
||||
auto transform = m_World->AddComponent<Components::Transform>(background);
|
||||
|
||||
@@ -13,7 +13,8 @@ struct ParticleEmitter : public Component
|
||||
float InitialSpeed = 1.f;
|
||||
double SpawnRate = 1;
|
||||
int ParticlesPerTick = 1;
|
||||
double TimeSinceLastSpawn = 0;
|
||||
//TODO: Refactor. Have cooldown instead of this
|
||||
double TimeSinceLastSpawn = 100;
|
||||
int MaxCount = 0;
|
||||
float EmittingAngle = 0.f;
|
||||
float Spread = 0.f;
|
||||
|
||||
@@ -19,6 +19,7 @@ struct Contact : Event
|
||||
{
|
||||
EntityID Entity1;
|
||||
EntityID Entity2;
|
||||
glm::vec2 IntersectionPoint;
|
||||
glm::vec2 Normal;
|
||||
glm::vec2 SignificantNormal;
|
||||
};
|
||||
|
||||
@@ -22,9 +22,10 @@ struct CreateParticleSequence : public Event
|
||||
float Spread = 1.f;
|
||||
float EmittingAngle = 0.f;
|
||||
float MaxCount = 0;
|
||||
glm::vec4 Color = glm::vec4(0);
|
||||
|
||||
//Particle
|
||||
std::string SpriteFile = "Texures/Core/ErrorTexture.png";
|
||||
std::string SpriteFile = "";
|
||||
double ParticleLifeTime = 3.f;
|
||||
ParticleFlags::Type Flags = static_cast<ParticleFlags::Type>(ParticleFlags::Powder | ParticleFlags::ParticleContactFilter | ParticleFlags::FixtureContactFilter);
|
||||
float Radius = 1.f;
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
#include "Game/CBall.h"
|
||||
|
||||
#include "Rendering/CSprite.h"
|
||||
#include "Rendering/CModel.h"
|
||||
|
||||
|
||||
namespace dd
|
||||
@@ -113,6 +114,8 @@ namespace dd
|
||||
bool OnPause(const dd::Events::Pause &event);
|
||||
dd::EventRelay<PhysicsSystem, dd::Events::StageCleared> m_EStageCleared;
|
||||
bool OnStageCleared(const dd::Events::StageCleared &event);
|
||||
dd::EventRelay<PhysicsSystem, dd::Events::Contact> m_EContact;
|
||||
bool OnContact(const dd::Events::Contact &event);
|
||||
bool m_Travelling = false;
|
||||
float m_Timer = 0;
|
||||
|
||||
@@ -173,7 +176,7 @@ namespace dd
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -196,7 +199,7 @@ namespace dd
|
||||
};
|
||||
|
||||
DestructionListener* m_DestructionListener;
|
||||
ParticleContactDisabler m_ParticleContactDisabler;
|
||||
ParticleContactDisabler* m_ParticleContactDisabler;
|
||||
ContactListener* m_ContactListener;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user