Add different explosion effect for Android.
It gives much better performance while it still looks similar.
This commit is contained in:
parent
77161cc583
commit
c3e772e863
30
data/gfx/explosion_low.xml
Normal file
30
data/gfx/explosion_low.xml
Normal 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>
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user