@@ -35,14 +35,14 @@ var ParticleEmitter = new Class({
3535 this . alive = [ ] ;
3636 this . minSpeed = 0 ;
3737 this . maxSpeed = 0 ;
38- this . minScale = 1.0 ;
39- this . maxScale = 1.0 ;
40- this . minAlpha = 1.0 ;
41- this . maxAlpha = 1.0 ;
42- this . minAngle = 0 ;
43- this . maxAngle = 0 ;
44- this . minPartAngle = 0 ;
45- this . maxPartAngle = 0 ;
38+ this . startScale = 1.0 ;
39+ this . endScale = 1.0 ;
40+ this . startAlpha = 1.0 ;
41+ this . endAlpha = 1.0 ;
42+ this . minEmitAngle = 0 ;
43+ this . maxEmitAngle = 360 ;
44+ this . startAngle = 0 ;
45+ this . endAngle = 0 ;
4646 this . gravityX = 0 ;
4747 this . gravityY = 0 ;
4848 this . life = 1.0 ;
@@ -86,26 +86,26 @@ var ParticleEmitter = new Class({
8686
8787 setEmitAngle : function ( min , max )
8888 {
89- this . minAngle = min ;
90- this . maxAngle = max ;
89+ this . minEmitAngle = min ;
90+ this . maxEmitAngle = max ;
9191 } ,
9292
9393 setScale : function ( start , end )
9494 {
95- this . minScale = start ;
96- this . maxScale = end ;
95+ this . startScale = start ;
96+ this . endScale = end ;
9797 } ,
9898
9999 setAlpha : function ( start , end )
100100 {
101- this . minAlpha = start ;
102- this . maxAlpha = end ;
101+ this . startAlpha = start ;
102+ this . endAlpha = end ;
103103 } ,
104104
105- setAngle : function ( min , max )
105+ setAngle : function ( start , end )
106106 {
107- this . minPartAngle = min ;
108- this . maxPartAngle = max ;
107+ this . startAngle = start ;
108+ this . endAngle = end ;
109109 } ,
110110
111111 setGravity : function ( x , y )
@@ -180,7 +180,7 @@ var ParticleEmitter = new Class({
180180 emitParticle : function ( )
181181 {
182182 var particle = null ;
183- var rad = Between ( this . minAngle , this . maxAngle ) * Math . PI / 180 ;
183+ var rad = Between ( this . minEmitAngle , this . maxEmitAngle ) * Math . PI / 180 ;
184184 var vx = Math . cos ( rad ) * Between ( this . minSpeed , this . maxSpeed ) ;
185185 var vy = Math . sin ( rad ) * Between ( this . minSpeed , this . maxSpeed ) ;
186186
@@ -198,15 +198,15 @@ var ParticleEmitter = new Class({
198198 particle . velocityY = vy ;
199199 particle . life = Math . max ( this . life , Number . MIN_VALUE ) ;
200200 particle . lifeStep = particle . life ;
201- particle . start . scale = this . minScale ;
202- particle . end . scale = this . maxScale ;
203- particle . scaleX = this . minScale ;
204- particle . scaleY = this . minScale ;
205- particle . start . alpha = this . minAlpha ;
206- particle . end . alpha = this . maxAlpha ;
207- particle . start . rotation = this . minPartAngle * Math . PI / 180 ;
208- particle . end . rotation = this . maxPartAngle * Math . PI / 180 ;
209- particle . color = ( particle . color & 0x00FFFFFF ) | ( ( ( this . minAlpha * 0xFF ) | 0 ) << 24 ) ;
201+ particle . start . scale = this . startScale ;
202+ particle . end . scale = this . endScale ;
203+ particle . scaleX = this . startScale ;
204+ particle . scaleY = this . startScale ;
205+ particle . start . alpha = this . startAlpha ;
206+ particle . end . alpha = this . endAlpha ;
207+ particle . start . rotation = this . startAngle * Math . PI / 180 ;
208+ particle . end . rotation = this . endAngle * Math . PI / 180 ;
209+ particle . color = ( particle . color & 0x00FFFFFF ) | ( ( ( this . startAlpha * 0xFF ) | 0 ) << 24 ) ;
210210 particle . index = this . alive . length ;
211211
212212 this . alive . push ( particle ) ;
0 commit comments