Particle Emitter :
- Changed cloning method to clone(boolean cloneMaterial), and added a clone() method that calls clone(true). The missing clone(boolean) method was preventing the particle emitter to be correctly cloned when loading it from a j3o file yielding weird results. git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7946 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
This commit is contained in:
parent
8de7a5755e
commit
865c380b4e
@ -150,7 +150,12 @@ public class ParticleEmitter extends Geometry {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ParticleEmitter clone() {
|
public ParticleEmitter clone() {
|
||||||
ParticleEmitter clone = (ParticleEmitter) super.clone();
|
return clone(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ParticleEmitter clone(boolean cloneMaterial) {
|
||||||
|
ParticleEmitter clone = (ParticleEmitter) super.clone(cloneMaterial);
|
||||||
clone.shape = shape.deepClone();
|
clone.shape = shape.deepClone();
|
||||||
|
|
||||||
// Reinitialize particle list
|
// Reinitialize particle list
|
||||||
@ -1147,6 +1152,7 @@ public class ParticleEmitter extends Geometry {
|
|||||||
startSize = ic.readFloat("startSize", 0);
|
startSize = ic.readFloat("startSize", 0);
|
||||||
endSize = ic.readFloat("endSize", 0);
|
endSize = ic.readFloat("endSize", 0);
|
||||||
worldSpace = ic.readBoolean("worldSpace", false);
|
worldSpace = ic.readBoolean("worldSpace", false);
|
||||||
|
this.setIgnoreTransform(worldSpace);
|
||||||
facingVelocity = ic.readBoolean("facingVelocity", false);
|
facingVelocity = ic.readBoolean("facingVelocity", false);
|
||||||
selectRandomImage = ic.readBoolean("selectRandomImage", false);
|
selectRandomImage = ic.readBoolean("selectRandomImage", false);
|
||||||
randomAngle = ic.readBoolean("randomAngle", false);
|
randomAngle = ic.readBoolean("randomAngle", false);
|
||||||
@ -1197,6 +1203,7 @@ public class ParticleEmitter extends Geometry {
|
|||||||
// loaded separately
|
// loaded separately
|
||||||
control = getControl(ParticleEmitterControl.class);
|
control = getControl(ParticleEmitterControl.class);
|
||||||
control.parentEmitter = this;
|
control.parentEmitter = this;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user