Eventbaserade partiklar. Fick nån krasch i physicssystem efter ett tags spelande, men det hoppas jag löser sig när jag mergar in Viktors senaste fysikfixar :3
This commit is contained in:
@@ -164,10 +164,29 @@ bool dd::Systems::SoundSystem::OnContact(const dd::Events::Contact &event)
|
||||
}
|
||||
|
||||
//Send play-sound event
|
||||
dd::Events::PlaySound e;
|
||||
e.path = collisionSound->filePath;
|
||||
e.isAmbient = false;
|
||||
EventBroker->Publish(e);
|
||||
|
||||
{
|
||||
dd::Events::PlaySound e;
|
||||
e.path = collisionSound->filePath;
|
||||
e.isAmbient = false;
|
||||
EventBroker->Publish(e);
|
||||
}
|
||||
|
||||
{
|
||||
Events::CreateParticleSequence e;
|
||||
e.Position = glm::vec3(0.f, 0.f, -10.f);
|
||||
e.SpriteFile = "Textures/Background.png";
|
||||
e.GravityScale = 0.0f;
|
||||
e.SpawnRate = 1.f;
|
||||
e.NumberOfTicks = 2;
|
||||
e.Speed = 1.f;
|
||||
e.ParticlesPerTick = 5;
|
||||
e.Spread = glm::pi<float>() * 2;
|
||||
e.EmittingAngle = glm::pi<float>();
|
||||
e.EmitterLifeTime = 50;
|
||||
e.ParticleLifeTime = 3.f;
|
||||
EventBroker->Publish(e);
|
||||
}
|
||||
//return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user