mirror of
https://github.com/overte-org/overte.git
synced 2025-08-10 13:07:04 +02:00
tweaks
This commit is contained in:
parent
e245ad93d6
commit
dea41edf9c
1 changed files with 10 additions and 7 deletions
|
@ -53,6 +53,7 @@
|
||||||
type: "ParticleEffect",
|
type: "ParticleEffect",
|
||||||
position: smokeTrailPosition,
|
position: smokeTrailPosition,
|
||||||
lifespan: 2,
|
lifespan: 2,
|
||||||
|
lifetime: 20,
|
||||||
name: "Smoke Trail",
|
name: "Smoke Trail",
|
||||||
maxParticles: 3000,
|
maxParticles: 3000,
|
||||||
emitRate: 50,
|
emitRate: 50,
|
||||||
|
@ -94,24 +95,26 @@
|
||||||
smokeSettings.lifespan = 0.7;
|
smokeSettings.lifespan = 0.7;
|
||||||
smokeSettings.emitAcceleration.y= -1;;
|
smokeSettings.emitAcceleration.y= -1;;
|
||||||
smokeSettings.alphaStart = 0.7;
|
smokeSettings.alphaStart = 0.7;
|
||||||
smokeSettings.alphaFinish = 0.2;
|
smokeSettings.alphaFinish = 0.1;
|
||||||
smokeSettings.radiusFinish = 0.06;
|
smokeSettings.radiusFinish = 0.06;
|
||||||
smokeSettings.particleRadius = 0.06;
|
smokeSettings.particleRadius = 0.06;
|
||||||
smokeSettings.emitRate = 200;
|
smokeSettings.emitRate = 200;
|
||||||
smokeSettings.emitterShouldTrail = false;
|
smokeSettings.emitterShouldTrail = false;
|
||||||
_this.fire = Entities.addEntity(smokeSettings);
|
_this.fire = Entities.addEntity(smokeSettings);
|
||||||
|
|
||||||
// Script.setTimeout(function() {
|
Script.setTimeout(function() {
|
||||||
// var explodePosition = Entities.getEntityProperties(_this.missle, "position").position;
|
var explodePosition = Entities.getEntityProperties(_this.missle, "position").position;
|
||||||
// Entities.deleteEntity(_this.missle);
|
_this.explodeFirework(explodePosition);
|
||||||
// Entities.deleteEntity(_this.smoke);
|
}, randFloat(_this.timeToExplosionRange.min, _this.timeToExplosionRange.max));
|
||||||
// _this.explodeFirework(explodePosition);
|
|
||||||
// }, randFloat(_this.timeToExplosionRange.min, _this.timeToExplosionRange.max));
|
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
explodeFirework: function(explodePosition) {
|
explodeFirework: function(explodePosition) {
|
||||||
|
// We just exploded firework, so stop emitting its fire and smoke
|
||||||
|
Entities.editEntity(_this.smoke, {parentID: null, isEmitting: false});
|
||||||
|
Entities.editEntity(_this.fire, {parentID: null, isEmitting: false});
|
||||||
|
Entities.deleteEntity(_this.missle);
|
||||||
Audio.playSound(_this.explosionSound, {position: explodePosition});
|
Audio.playSound(_this.explosionSound, {position: explodePosition});
|
||||||
var fireworkSettings = {
|
var fireworkSettings = {
|
||||||
name: "fireworks emitter",
|
name: "fireworks emitter",
|
||||||
|
|
Loading…
Reference in a new issue