Add different explosion effect for Android.

It gives much better performance while it still looks similar.
This commit is contained in:
Deve 2017-10-17 23:30:17 +02:00
parent 77161cc583
commit c3e772e863
2 changed files with 37 additions and 1 deletions

View File

@ -0,0 +1,30 @@
<?xml version="1.0"?>
<particles emitter="sphere" radius="0.1">
<spreading angle="180" />
<velocity x="0.000"
y="0.0035"
z="0.000" />
<material file="explode.png" />
<!-- Amount of particles emitted per second -->
<rate min="100"
max="150" />
<!-- Minimal and maximal lifetime of a particle, in milliseconds. -->
<lifetime min="700"
max="900" />
<!-- Size of the particles -->
<size min="0.8"
max="1.0"
x-increase-factor="0.6"
y-increase-factor="0.6"
/>
<color min="255 255 255"
max="255 255 255" />
</particles>

View File

@ -42,8 +42,14 @@ Explosion::Explosion(const Vec3& coord, const char* explosion_sound, const char
m_emission_frames = 0;
#ifndef SERVER_ONLY
std::string filename = particle_file;
#ifdef ANDROID
filename = "explosion_low.xml";
#endif
ParticleKindManager* pkm = ParticleKindManager::get();
ParticleKind* particles = pkm->getParticles(particle_file);
ParticleKind* particles = pkm->getParticles(filename);
m_emitter = NULL;
if (UserConfigParams::m_graphical_effects > 1)