Merge remote-tracking branch 'origin/master' into LevelSystemAndSuch.
This commit is contained in:
@@ -35,7 +35,9 @@ void dd::Systems::BallSystem::Initialize()
|
||||
transform->Scale = glm::vec3(0.3f, 0.3f, 0.3f);
|
||||
transform->Velocity = glm::vec3(0.f, 0.f, 0.f);
|
||||
auto model = m_World->AddComponent<Components::Model>(ent);
|
||||
model->ModelFile = "Models/Test/Ball/Sid.obj";
|
||||
model->ModelFile = "Models/Sid/Sid.dae";
|
||||
auto animation = m_World->AddComponent<Components::Animation>(ent);
|
||||
animation->Speed = 1.0;
|
||||
std::shared_ptr<Components::CircleShape> circleShape = m_World->AddComponent<Components::CircleShape>(ent);
|
||||
circleShape->Radius = 0.4f;
|
||||
std::shared_ptr<Components::Ball> ball = m_World->AddComponent<Components::Ball>(ent);
|
||||
@@ -308,7 +310,7 @@ bool dd::Systems::BallSystem::Contact(const Events::Contact &event)
|
||||
} else if (ballTransform->Position.x <= -2.7f) {
|
||||
particleEvent.Position = glm::vec3(-2.7f, -3.f, -3.f);
|
||||
}
|
||||
particleEvent.Radius = 1.f;
|
||||
particleEvent.ScaleValues.push_back(glm::vec3(1.f));
|
||||
particleEvent.Color = glm::vec4(1.f);
|
||||
particleEvent.Speed = 0;
|
||||
|
||||
@@ -322,7 +324,7 @@ bool dd::Systems::BallSystem::Contact(const Events::Contact &event)
|
||||
EventBroker->Publish(particleEvent);
|
||||
}
|
||||
|
||||
ballComponent->Combo = 56;
|
||||
ballComponent->Combo = 0;
|
||||
if (!ballComponent->Waiting) {
|
||||
if (m_InkBlaster) {
|
||||
if (!m_InkAttached) {
|
||||
@@ -421,7 +423,7 @@ void dd::Systems::BallSystem::CreateLife(int number)
|
||||
lifeNr->Number = number;
|
||||
|
||||
auto model = m_World->AddComponent<Components::Model>(life);
|
||||
model->ModelFile = "Models/Test/Ball/Sid.obj";
|
||||
model->ModelFile = "Models/Sid/Sid.dae";
|
||||
|
||||
|
||||
m_World->CommitEntity(life);
|
||||
|
||||
@@ -612,6 +612,7 @@ bool dd::Systems::LevelSystem::OnContact(const dd::Events::Contact &event)
|
||||
brick->Removed = true;
|
||||
m_World->RemoveEntity(entityShot);
|
||||
BrickHit(entityShot, entityBrick, 1);
|
||||
//ep.Radius = 0.05;
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -719,6 +720,45 @@ void dd::Systems::LevelSystem::BrickHit(EntityID entityHitter, EntityID entityBr
|
||||
m_World->RemoveComponent<Components::Template>(b);
|
||||
m_World->SetEntityParent(b, 0);
|
||||
m_World->CommitEntity(b);
|
||||
|
||||
//Particle trail
|
||||
Events::CreateParticleSequence trail;
|
||||
trail.parent = b;
|
||||
trail.AlphaValues.push_back(1.f);
|
||||
trail.AlphaValues.push_back(0.f);
|
||||
trail.ScaleValues.push_back(glm::vec3(0.08f));
|
||||
trail.ScaleValues.push_back(glm::vec3(0.f));
|
||||
trail.RadiusDistribution = 1;
|
||||
trail.EmitterLifeTime = 2.f;
|
||||
trail.ParticleLifeTime = 1.f;
|
||||
trail.ParticlesPerTick = 1;
|
||||
trail.SpawnRate = 0.1f;
|
||||
trail.Speed = 10.f;
|
||||
trail.EmittingAngle = glm::half_pi<float>();
|
||||
trail.SpriteFile = "Textures/Particles/FadeBall.png";
|
||||
trail.Color = brickModel->Color;
|
||||
//p.Spread = ...
|
||||
EventBroker->Publish(trail);
|
||||
|
||||
//ParticlePoof
|
||||
Events::CreateParticleSequence poof;
|
||||
poof.EmitterLifeTime = 4;
|
||||
poof.EmittingAngle = glm::half_pi<float>();
|
||||
poof.Spread = 0.5f;
|
||||
poof.NumberOfTicks = 1;
|
||||
poof.ParticleLifeTime = 1.5f;
|
||||
poof.ParticlesPerTick = 1;
|
||||
poof.Position = cTransform->Position;
|
||||
poof.ScaleValues.clear();
|
||||
poof.ScaleValues.push_back(glm::vec3(0.5f));
|
||||
poof.ScaleValues.push_back(glm::vec3(2.f, 2.f, 0.2f));
|
||||
poof.SpriteFile = "Textures/Particles/Cloud_Particle.png";
|
||||
poof.Color = brickModel->Color;
|
||||
poof.AlphaValues.clear();
|
||||
poof.AlphaValues.push_back(1.f);
|
||||
poof.AlphaValues.push_back(0.f);
|
||||
poof.Speed = 10;
|
||||
EventBroker->Publish(poof);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user