erkerk7k Posted April 10, 2018 Share Posted April 10, 2018 var fog = this.add.image(500, 200, 'dragon').setOrigin(0); this.tweens.add({ targets: fog, x: -300, ease: 'Circle', duration: 30000, repeat: -1 }); var light1 = this.lights.addLight(280, 400, 200,2332,50); var ellipse1 = new Phaser.Geom.Ellipse(light1.x, light1.y, 70, 100); var light2 = this.lights.addLight(500, 386, 200,200,20); var ellipse2 = new Phaser.Geom.Ellipse(light2.x, light2.y, 30, 40); this.time.addEvent({ delay: 100, callback: function () { Phaser.Geom.Ellipse.Random(ellipse1, light1); Phaser.Geom.Ellipse.Random(ellipse2, light2); }, callbackScope: this, repeat: -1 }); var light3 = this.lights.addLight(500, 400, 200,200,20); var dummy = this.add.image(400, 400, 'dragon').setVisible(false); this.tweens.add({ targets: [ light3, dummy ], y: 150, ease: 'Sine.easeInOut', yoyo: true, repeat: -1, duration: 3000 }); Im stuck on this example in the examples for phaser 3 First create lights to make candles more realistic and typescript demands 5 arguments. i have no clue what to fill in fourth "RGB" it onli accept integers though nothing else and this.lights(enable) is set too but it not showing on the screen here. The fog animation tween works perfectly fine but it refuses to light is it me doin anithing wrong or is it updated allready to new code what can be the issue? kind regards. Link to comment Share on other sites More sharing options...
Recommended Posts