var EHDI = EHDI || Object.create(nul); EHDI.components = EHDI.components || Object.create(null); EHDI.components.StarParticle = function() { //PIXI.particles.ParticleContainer.call(this); EHDI.aka.Container.call(this); //this.animationTimeline = new TimelineMax(); this.interactive=false; //this.visible = false; // this.addChild(containerSprite); this.stars = new Array(); var star; for(i=0; i<40; i++) { star = new EHDI.aka.Sprite(EHDI.Assets.images["timetravel_sparkle"]); this.stars.push(star); this.addChild(star); star.anchor.x=0.5; star.anchor.y=0.5; } this.alpha=0; //this.starUpdate = this.updateTime.bind(this); // EHDI.GAME.updateManager.addFrameListener(this.starUpdate); }; EHDI.components.StarParticle.prototype = Object.create(EHDI.aka.Container.prototype); EHDI.components.StarParticle.prototype.loopTransition=function(originX,originY,originWidth,originHeight,targetX,targetY) { if(this.animationTimeline!=null) { this.animationTimeline.kill(); this.animationTimeline.clear(); } this.alpha=1; for(i=0; i