1 decade ago by doobdargent
Hey all,
I'm using Animation.angle to "rotate" my sprites, but when I modify one of my Animation, all the other are also modified.
I'm making a tower defense and I have lots of turrets.
Am I doing something wrong here?
Cheers!
I'm using Animation.angle to "rotate" my sprites, but when I modify one of my Animation, all the other are also modified.
I'm making a tower defense and I have lots of turrets.
EntityTurret = EntitySelectable.extend({ base: new ig.Image('media/tower-arrow-base.png'), gun: new ig.Animation(new ig.AnimationSheet('media/tower-arrow-gun.png', 40, 40), 1, [0]), lookTo: function( mob ){ var theta = Math.PI; this.gun.angle = theta; }, ... });
Am I doing something wrong here?
Cheers!