node.copy()
lets say i have[code]class enemy{
var sprite;
}
......
var enm = new enemy();
enm.sprite=scene.addsprite("angrylargewtf.png").pos(100,10);
var enm2 = enm.copy();
enm2.sprite.addaction(imoveby(100,100));
.....
[/code]// and thats not actual code, this is a "for instance" so there might be typos.
does the sprite copy and make a duplicate sprite for the second enemy or will both enemies be pointing at the same sprite?
enm.sprite.copy(), not enm.copy()
It makes a duplicate. ah, so it only works with sprites :/
Page:
[1]